version: "3.8" services: backend: build: context: ./backend dockerfile: Dockerfile container_name: backup-tool-backend ports: - "8000:8000" environment: - DATABASE_URL=sqlite+aiosqlite:///data/backup_tool.db - CORS_ORIGINS=http://localhost:3000 - BACKUP_STORAGE_PATH=/app/backups volumes: - backup-data:/app/data - backup-storage:/app/backups restart: unless-stopped healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')"] interval: 30s timeout: 10s retries: 3 start_period: 5s frontend: build: context: ./frontend dockerfile: Dockerfile container_name: backup-tool-frontend ports: - "3000:80" depends_on: - backend restart: unless-stopped profiles: - prod frontend-dev: image: node:20-alpine container_name: backup-tool-frontend-dev working_dir: /app ports: - "3000:3000" volumes: - ./frontend:/app - /app/node_modules command: sh -c "npm install && npm run dev" environment: - VITE_API_URL=http://localhost:8000 depends_on: - backend profiles: - dev volumes: backup-data: driver: local backup-storage: driver: local