Replace two-container setup (separate backend + nginx frontend) with a single image that runs both via supervisord: - New Dockerfile: Node stage builds React, Python+nginx stage is the runtime - supervisord.conf: manages uvicorn (api_server.py) + nginx as sibling procs - nginx.conf: proxy_pass updated to localhost:8000 (same container) - docker-compose.yml: simplified to one service on port 80 Deploy: docker-compose up -d # or docker build -t flight-radar . && docker run -p 80:80 flight-radar Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
482 B
Plaintext
25 lines
482 B
Plaintext
[supervisord]
|
|
nodaemon=true
|
|
logfile=/dev/null
|
|
logfile_maxbytes=0
|
|
pidfile=/tmp/supervisord.pid
|
|
|
|
[program:api]
|
|
command=python /app/api_server.py
|
|
directory=/app
|
|
autostart=true
|
|
autorestart=true
|
|
stdout_logfile=/dev/stdout
|
|
stdout_logfile_maxbytes=0
|
|
stderr_logfile=/dev/stderr
|
|
stderr_logfile_maxbytes=0
|
|
|
|
[program:nginx]
|
|
command=nginx -g "daemon off;"
|
|
autostart=true
|
|
autorestart=true
|
|
stdout_logfile=/dev/stdout
|
|
stdout_logfile_maxbytes=0
|
|
stderr_logfile=/dev/stderr
|
|
stderr_logfile_maxbytes=0
|