Skip to content

Commit 9b57c56

Browse files
fix(docker): use writable directories for supervisord pid and redis data
- supervisord: write pidfile to /tmp (tmpfs) instead of read-only /app - redis: set working dir to /var/lib/redis (tmpfs) for RDB snapshots Fixes "could not write pidfile" and "Failed opening temp RDB file" errors in read-only root filesystem deployment (docker-compose.yml security hardening). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent acd16fa commit 9b57c56

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎deploy/docker/entrypoint.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ else
3434
fi
3535
export GUNICORN_BIND
3636

37-
exec supervisord -c supervisord.conf
37+
exec supervisord -c supervisord.conf --pidfile /tmp/supervisord.pid

‎deploy/docker/supervisord.conf‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ logfile_maxbytes=0
66
[program:redis]
77
; Loopback-only and password-protected. REDIS_PASSWORD is exported by
88
; entrypoint.sh from the mounted secret; the app must supply it to connect.
9-
command=/usr/bin/redis-server --loglevel notice --bind 127.0.0.1 ::1 --requirepass "%(ENV_REDIS_PASSWORD)s"
9+
command=/usr/bin/redis-server --loglevel notice --bind 127.0.0.1 ::1 --requirepass "%(ENV_REDIS_PASSWORD)s" --dir /var/lib/redis
1010
user=appuser ; Run redis as our non-root user
1111
autorestart=true
1212
priority=10

0 commit comments

Comments
 (0)