refactor: split back into two containers (backend + frontend)
Single-container supervisord approach added unnecessary complexity. Two containers is simpler and more standard: - Dockerfile.backend: python:3.11-slim, uvicorn on port 8000 - Dockerfile.frontend: node build → nginx:alpine on port 80 - nginx.conf: proxy_pass restored to http://backend:8000 - docker-compose.yml: two services with depends_on - Removed combined Dockerfile and supervisord.conf Each container does one thing; logs are separate; either can be restarted independently. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,15 +1,28 @@
|
||||
services:
|
||||
app:
|
||||
build: .
|
||||
container_name: flight-radar
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.backend
|
||||
container_name: flight-radar-backend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "8000:8000"
|
||||
environment:
|
||||
- DATABASE_PATH=/app/data/cache.db
|
||||
volumes:
|
||||
- flight-radar-data:/app/data
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.frontend
|
||||
container_name: flight-radar-frontend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
volumes:
|
||||
flight-radar-data:
|
||||
driver: local
|
||||
|
||||
Reference in New Issue
Block a user