From e5a8736fabc7242bb8a35a24dc125b6823d715b3 Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 26 May 2021 02:51:58 -0500 Subject: [PATCH] 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. --- docker-compose.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index 4e2a4260c..8b40fcb07 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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"]