noirscape / e621-docker

Easily deploy E621 on a local server.
7 stars 1 forks source link

E621 docker images

These are docker images that allow you to deploy an instance of E621 with... relative ease.

Instructions

Prerequisites

Configuration

  1. Copy env.example to .env. Optionally, change NGINX_PORT if you want to run the service on a different port.
  2. Copy core/danbooru_local_config.example.rb to core/danbooru_local_config.rb. This file can be used to override any setting in here. Make sure to check below for the values you can't change (docker overrides a couple in order to make E621 talk to the network's redis, memcached and elasticsearch containers).
  3. Create your data folders. If you're using the default configuration, this will be in the data folder locally. Make sure that the elasticsearch scratch space (in default configuration, this is ./data/es) has been set to be read/write for everywhere.
  4. Set vm.overcommit_memory=1 and vm.max_map_count=262144 in /etc/sysctl.conf to make redis and elasticsearch work. (If you have a /etc/sysctl.d folder, make a new file called docker.conf and add them in there). To temporarily raise it for the current session, run sysctl -w vm.max_map_count=262144 and sysctl -w vm.overcommit_memory=1 as root.
  5. Run docker-compose pull to pull in the containers.
  6. Run docker-compose up to bring up the images. On the first run, the database will be initialized, which takes a few minutes.
  7. Reference the HACKS file to see if you need to apply any hacks.
  8. After applying hacks, restart all containers with docker-compose restart.
  9. Success

Updating

  1. Run docker-compose pull to update the containers.
  2. Reference the HACKS file to see if you need to undo or apply any hacks.
  3. Run docker-compose run --rm core rake db:migrate to run the database migrations.
  4. Run docker-compose up to bring up the images again.

Note

Changes from mainline E621 source code

The following change is not a git diff file, but happens in the docker building process:

Things you can't change in local_config

The following values should not be overriden by the local_config file.

Maintainers

Credits

TODO

Pull Requests for these are welcome.