Commit Graph

12 Commits

Author SHA1 Message Date
nonamethanks
d1b6f30517 Docker compose: add project name to the file.
When docker compose creates the various services, it names the
containers like <projectname>-<servicename>-<id>. If
COMPOSE_PROJECT_NAME is not set and there's no name property
at the root level of the yaml, the default project name is the
current directory. This breaks the deployment from directories
with unusable names, such as C:\.

Fixes #5304.

This should not break existing installations that are pulling from
master, as long as the base folder is danbooru/ (default for git clone).
2022-10-21 18:24:30 +02:00
nonamethanks
ec05d21091 Docker compose: add comments and use templating 2022-10-19 21:44:03 +02:00
nonamethanks
a34f5f95be docker-compose: do db:seed before server start
This is needed to create DanbooruBot and enable uploads, among other
things.
2022-03-07 03:10:51 +01:00
evazion
f4953549ae jobs: switch from DelayedJob to GoodJob.
Switch the ActiveJob backend from DelayedJob to GoodJob. Differences:

* The job worker is run with `bin/good_job start` instead of `bin/delayed_job`.
* Jobs have an 8 hour timeout instead of a 4 hour timeout.
* Jobs don't automatically retry on failure.
* Finishing jobs are preserved and pruned after 7 days.
2022-01-04 13:52:08 -06:00
evazion
c183237b6b docker: update docker-compose file.
* Listen on port 3000 instead of port 80. Port 80 is prone to conflicts
  with other webservers.

* Use the production version of the Danbooru Docker image. It's less
  likely to have bugs than master.

* Fix the autoinstall script to work with `curl ... | sh`.

* Lower PUMA_WORKERS to 1 to reduce memory usage.
2021-09-24 08:40:33 -05:00
evazion
7e3371f758 docker-compose: use images from Github instead of DockerHub.
Use the Danbooru Docker images from the Github Container Registry
instead of the DockerHub registry for the Compose file. Github is now
considered the canonical source for Danbooru's Docker images. DockerHub
is considered a mirror.

* https://github.com/danbooru/danbooru/pkgs/container/danbooru
* https://hub.docker.com/r/evazion/danbooru
2021-09-16 00:35:30 -05:00
evazion
5648176f0e docker: add IQDB to Docker Compose file. 2021-06-16 07:14:07 -05:00
evazion
e5a8736fab docker: fix failure to restart app with Docker Compose.
Fix docker-compose sometimes failing to restart the app. Puma's pidfile
was stored in /tmp, which was persisted across restarts, which caused
restarts to fail because the pidfile already existed. The fix is to
mount /tmp as a tmpfs.
2021-05-26 02:51:58 -05:00
evazion
55b7b96c6c docker: add redis to compose file. 2021-05-26 02:44:10 -05:00
evazion
f65f24be0b docker: add cron service to compose file. 2021-05-25 01:16:59 -05:00
evazion
896ddab55d docker: add delayed job worker to compose file. 2021-05-24 20:15:05 -05:00
evazion
3f6587089e docker: rename docker-compose file.
Move the docker-compose file up to the root directory so you can just do
`docker-compose up` to bring up Danbooru.
2021-05-21 08:05:02 -05:00