services: backend: image: python:3.11-slim working_dir: /app volumes: - ./main.py:/app/main.py:ro - ./data:/data:ro command: > sh -c "pip install --quiet fastapi uvicorn pandas python-multipart && uvicorn main:app --host 0.0.0.0 --port 8000" restart: unless-stopped frontend: image: nginx:alpine ports: - "8070:80" volumes: - ./index.html:/usr/share/nginx/html/index.html - ./nginx.conf:/etc/nginx/conf.d/default.conf entrypoint: > sh -c "chmod 644 /usr/share/nginx/html/index.html && chmod 644 /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" depends_on: - backend restart: unless-stopped