chore: dockerfile (testing)

This commit is contained in:
2026-09-18 23:00:38 +02:00
parent 979be91417
commit 59b568ff41
6 changed files with 253 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
; Runs inside the single app container as the non-root "app" user (see
; Dockerfile's USER app - no [supervisord] user= needed, we never start as
; root here). Unlike deploy/supervisor/polylan-submitter.conf (multiple
; daphne processes behind HAProxy on one bare-metal host), this container
; runs ONE daphne process on TCP: scale by running more container replicas
; behind an external reverse proxy/load balancer instead of more processes
; per container.
;
; Program logs go to stdout/stderr (logfile_maxbytes=0 disables supervisor's
; own log rotation for them) so `docker logs` / Proxmox's log viewer picks
; them up - no log files inside the container to manage.
[supervisord]
nodaemon=true
pidfile=/tmp/supervisord.pid
logfile=/dev/null
logfile_maxbytes=0
[program:web]
command=/app/.venv/bin/daphne -b 0.0.0.0 -p 8000 polylan_submitter.asgi:application
directory=/app/polylan_submitter
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
stopsignal=TERM
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
; RQ workers - same command as deploy/supervisor/polylan-submitter.conf.
[program:worker]
command=/app/.venv/bin/python manage.py rqworker default --job-class django_tasks_rq.Job --with-scheduler
directory=/app/polylan_submitter
process_name=%(program_name)s-%(process_num)02d
numprocs=2
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
stopsignal=TERM
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0