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.
This commit is contained in:
evazion
2021-05-26 02:51:58 -05:00
parent 55b7b96c6c
commit e5a8736fab

View File

@@ -32,6 +32,8 @@ services:
- DANBOORU_CANONICAL_URL=http://localhost
volumes:
- "danbooru-images:/danbooru/public/data"
tmpfs:
- /tmp
depends_on:
- postgres
command: ["bash", "-c", "bin/rails db:setup; bin/rails db:migrate && bin/rails server -b 0.0.0.0"]