add docker file

This commit is contained in:
2025-08-31 18:26:36 +03:00
parent 876ddec94a
commit 3c420c1b7b
5 changed files with 132 additions and 28 deletions

View File

@@ -0,0 +1,47 @@
[supervisord]
nodaemon=true
logfile=/dev/null
pidfile=/var/run/supervisord.pid
; --- Flask API (gunicorn) ---
[program:api]
directory=/app/server
command=/usr/local/bin/gunicorn --bind %(ENV_API_BIND)s --workers 2 --threads 4 app:app
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stderr_logfile=/dev/stderr
stdout_logfile_maxbytes=0
stderr_logfile_maxbytes=0
startsecs=2
stopasgroup=true
killasgroup=true
; --- Flet web app ---
; If your app reads API URL from env, set it here as a relative path (/api)
[program:flet]
directory=/app/client
environment=API_BASE_URL="%(ENV_API_BASE_PATH)s"
command=/usr/local/bin/flet run --web --port 8080 main.py
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stderr_logfile=/dev/stderr
stdout_logfile_maxbytes=0
stderr_logfile_maxbytes=0
startsecs=2
stopasgroup=true
killasgroup=true
; --- Nginx (foreground) ---
[program:nginx]
command=/usr/sbin/nginx -g 'daemon off;'
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stderr_logfile=/dev/stderr
stdout_logfile_maxbytes=0
stderr_logfile_maxbytes=0
startsecs=2
stopasgroup=true
killasgroup=true