version: '3.8' services: api: build: context: .. dockerfile: docker/api.Dockerfile container_name: secrethawk-api ports: - "8000:8000" environment: - ENVIRONMENT=development - SECRET_KEY=dev-secret-key-change-in-production - DATABASE_URL=sqlite:///./secrethawk.db - ENCRYPTION_KEY=dev-encryption-key-change-in-production - FRONTEND_URL=http://localhost:3000 - BASE_URL=http://localhost:8000 - GITLEAKS_PATH=/usr/local/bin/gitleaks volumes: - ../apps/api:/app - api_db:/app/data - upload_temp:/tmp/secrethawk restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s web: build: context: .. dockerfile: docker/web.Dockerfile container_name: secrethawk-web ports: - "3000:80" environment: - VITE_API_URL=http://localhost:8000/api/v1 depends_on: - api restart: unless-stopped healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost/"] interval: 30s timeout: 10s retries: 3 # Optional: Redis for production caching/sessions redis: image: redis:7-alpine container_name: secrethawk-redis ports: - "6379:6379" volumes: - redis_data:/data restart: unless-stopped profiles: - production volumes: api_db: driver: local upload_temp: driver: local redis_data: driver: local networks: default: name: secrethawk-network