Skip to content

Commit 093fae8

Browse files
committed
chore: add Docker support with GitHub Packages publishing - Multi-stage Dockerfile (CPU default, CUDA-ready via BASE_IMAGE arg) - Single container running FastAPI + React frontend via supervisord - Model weights mounted as volume at runtime (/app/models) - docker-compose.yml for local development - GitHub Actions workflow publishing to ghcr.io on master push and version tags - .dockerignore to keep build context clean
1 parent 98be65e commit 093fae8

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Supervisord.conf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[supervisord]
2+
nodaemon=true
3+
logfile=/var/log/supervisor/supervisord.log
4+
pidfile=/var/run/supervisord.pid
5+
loglevel=info
6+
[program:fastapi]
7+
command=/venv/bin/uvicorn main:app --host 0.0.0.0 --port 3001
8+
directory=/app/backend
9+
autostart=true
10+
autorestart=true
11+
startretries=5
12+
stdout_logfile=/var/log/supervisor/fastapi.stdout.log
13+
stderr_logfile=/var/log/supervisor/fastapi.stderr.log
14+
stdout_logfile_maxbytes=10MB
15+
stderr_logfile_maxbytes=10MB
16+
environment=
17+
TORCH_CHECKPOINT_PATH="%(ENV_TORCH_CHECKPOINT_PATH)s",
18+
GPT_MODEL_PATH="%(ENV_GPT_MODEL_PATH)s",
19+
CORS_ORIGINS="%(ENV_CORS_ORIGINS)s",
20+
LOG_LEVEL="%(ENV_LOG_LEVEL)s",
21+
MAX_SESSIONS="%(ENV_MAX_SESSIONS)s",
22+
SESSION_TTL_HOURS="%(ENV_SESSION_TTL_HOURS)s"
23+
[program:frontend]
24+
command=serve -s /app/frontend/dist -l 8080
25+
autostart=true
26+
autorestart=true
27+
startretries=5
28+
stdout_logfile=/var/log/supervisor/frontend.stdout.log
29+
stderr_logfile=/var/log/supervisor/frontend.stderr.log
30+
stdout_logfile_maxbytes=5MB
31+
stderr_logfile_maxbytes=5MB

0 commit comments

Comments
 (0)