version: '3.8' services: # Production deployment (all-in-one container with Nginx reverse proxy) bttoxin: build: context: ../.. dockerfile: docker/dockerfiles/Dockerfile container_name: bttoxin-pipeline ports: - "80:80" volumes: - ../../jobs:/app/jobs - ../nginx/default.conf:/etc/nginx/sites-available/default:ro environment: - JOBS_DIR=/app/jobs restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost/health"] interval: 30s timeout: 10s retries: 3 # Development mode (source code mounted for hot reload) bttoxin-dev: image: ghcr.io/prefix-dev/pixi:latest container_name: bttoxin-dev ports: - "5180:5173" - "8010:8000" volumes: - ../..:/app - ../../jobs:/app/jobs working_dir: /app environment: - JOBS_DIR=/app/jobs # Use relative path for dev (Vite proxy handles /api) - VITE_API_BASE_URL= command: > bash -c " mkdir -p /app/jobs && pixi shell-hook -e webbackend > /app/activate_backend.sh && echo 'exec uvicorn backend.app.main:app --reload --host 0.0.0.0 --port 8000 \"\$@\"' >> /app/activate_backend.sh && bash /app/activate_backend.sh & sleep 5 && cd /app/frontend && pnpm dev --host --port 5173 & wait " restart: unless-stopped # Production with separate containers (if needed for scaling) bttoxin-frontend: image: nginx:alpine container_name: bttoxin-frontend ports: - "8080:80" volumes: - ../../dist:/usr/share/nginx/html:ro environment: - NGINX_HOST=localhost restart: unless-stopped bttoxin-backend: image: ghcr.io/prefix-dev/pixi:latest container_name: bttoxin-backend ports: - "8000:8000" volumes: - ../../jobs:/app/jobs working_dir: /app environment: - JOBS_DIR=/app/jobs command: uvicorn web.backend.main:app --host 0.0.0.0 --port 8000 restart: unless-stopped