version: '3.8' services: backend: build: context: ./backend dockerfile: Dockerfile container_name: bot-dashboard-backend volumes: - ./bots:/app/bots - bot-data:/app/data environment: - DATABASE_URL=sqlite:///./data/bot_dashboard.db - SECRET_KEY=${SECRET_KEY} - CORS_ORIGINS=${CORS_ORIGINS:-https://yourdomain.com} - LOG_LEVEL=INFO - AUTO_RESTART_BOTS=true restart: always healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 30s timeout: 10s retries: 3 frontend: build: context: ./frontend dockerfile: Dockerfile container_name: bot-dashboard-frontend environment: - NEXT_PUBLIC_API_URL=${API_URL:-https://yourdomain.com} - NEXT_PUBLIC_WS_URL=${WS_URL:-wss://yourdomain.com} depends_on: backend: condition: service_healthy restart: always nginx: image: nginx:alpine container_name: bot-dashboard-nginx ports: - "80:80" - "443:443" volumes: - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro - ./nginx/ssl:/etc/nginx/ssl:ro - nginx-cache:/var/cache/nginx depends_on: - frontend - backend restart: always volumes: bot-data: driver: local nginx-cache: driver: local networks: default: name: bot-dashboard-network