Add `less` to the Docker image to fix an issue with running `bin/rails console`. The console uses Pry[1], which has an issue where it pipes long output through `less`, but it tries to use the -X option, which is only supported by GNU less, not Busybox less. There's a open bug about this in the Pry repo dating back to 2014[2]. Add `tini` and use it as the Docker entrypoint to ensure we forward signals to child processes and reap zombie children properly. This fixes an issue where if you ran something like: docker run ghcr.io/danbooru/danbooru bash -c 'bin/rails db:test:prepare && bin/rails test' Then you couldn't use control-C to stop the container. This was because bash wasn't forwarding signals to its children, and because by default, programs running as PID 1 ignore SIGINT and SIGTERM. See [3][4] for details. 1: https://github.com/pry/pry 2: https://github.com/pry/pry/issues.1248 3: https://github.com/krallin/tini/issues.8 4: https://gist.github.com/StevenACoffman/41fee08e8782b411a4a26b9700ad7af5#dont-run-pid-1
Config
This directory contains configuration files for Danbooru.
To configure your Danbooru instance, copy danbooru_default_config.rb to danbooru_local_config.rb and edit it. See danbooru_default_config.rb for details.
The only file here that end users need to be concerned about is danbooru_default_config.rb. The rest of the files here are internal Rails-related configuration files that end users shouldn't need to edit.