Last commit was 1 day agoView on GitHub
an art image board
If you are on Windows Docker Compose is already included, you do not need to install it yourself.
If you are on Linux/MacOS you can probably use your package manager.
Developing on Windows requires some special setup to get good response times. Unfortunately performance across file systems is not great for WSL2 and recieving inotify events isn't possible. This leads to an all-around unpleasant experience. Read more about this here.
To mitigate this you can install a WSL distribution and clone the project inside there. Executing docker inside the container will still work, without directly accessing the host. Access the code with Remote Development for VSCode or simply use the network address
git clone https://github.com/e621ng/e621ng.git.
cdinto the repo.
cp .env.sample .env.
COMPOSE_PROFILESvariable if you wish to use solargraph. Doesn't work on Windows without WSL.
docker compose run --rm -e SEED_POST_COUNT=100 e621 /app/bin/setup docker compose upAfter running the commands once only
docker compose upis needed to bring up the containers.
http://localhost:3000into the address bar and see if the website loads correctly. An admin account has been created automatically, the username and password are
Note: When gems or js packages are updated you need to execute
docker compose build to reflect them in the container.
docker compose down -vto remove all volumes.
docker compose build --no-cacheto rebuild the image from scratch.
docker compose run --rm tests to execute the test suite.
docker compose run --rm rubocop to run the linter. Run it against changed files only, there are too many existing violations at the moment.
The postgres server accepts outside connections which you can use to access it with a local client. Use
localhost:34517 to connect to a database named
danbooru2 with the user
danbooru. Leave the password blank, anything will work.
Installation follows the same steps as the docker compose file. Ubuntu 20.04 is the current installation target.
There is no script that performs these steps for you, as you need to split them up to match your infrastructure.
Running a single machine install in production is possible, but is likely to be somewhat sluggish due to contention in disk between postgresql and elasticsearch.
Minimum RAM is 4GB. You will need to adjust values in config files to match how much RAM is available.
If you are targeting more than a hundred thousand posts and reasonable user volumes, you probably want to procure yourself a database server. See tuning guides for postgresql and elasticsearch for help planning these requirements.
These instructions won't work for everyone. If your setup is not
working, here are the steps I usually recommend to people:
1) Test the database. Make sure you can connect to it using psql. Make
sure the tables exist. If this fails, you need to work on correctly
installing PostgreSQL, importing the initial schema, and running the
2) Test the Rails database connection by using rails console. Run
Post.count to make sure Rails can connect to the database. If this
fails, you need to make sure your Danbooru configuration files are
3) Test Nginx to make sure it's working correctly. You may need to
debug your Nginx configuration file.
4) Check all log files.