These are docker images that allow you to deploy an instance of E621 with... relative ease.
env.example
to .env
. Optionally, change NGINX_PORT if you want to run the service on a different port.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).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.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.docker-compose pull
to pull in the containers.docker-compose up
to bring up the images. On the first run, the database will be initialized, which takes a few minutes.docker-compose restart
.docker-compose pull
to update the containers.docker-compose run --rm core rake db:migrate
to run the database migrations.docker-compose up
to bring up the images again.The following change is not a git diff file, but happens in the docker building process:
sed
in core/cable.yml
: An inline patch to make E621 talk to the redis container server.The following values should not be overriden by the local_config file.
elasticsearch_host
ssl_options
memcached_servers
redis_url
docker-compose build core --pull
should help identify any errors that might pop up.gem
works, but it's a workaround. When sanitize
(the gem that wants nokogumbo) is updated, check to make sure that the build still works and optionally remove the workaround.Pull Requests for these are welcome.