# ============================================ # Premium Valentine Website - Docker Compose # Production-Grade Container Orchestration # ============================================ version: '3.8' services: valentine-app: build: context: . dockerfile: Dockerfile container_name: valentine-experience image: valentine-app:3.0.0 # Port mapping ports: - "8080:8080" # Environment variables environment: - TZ=UTC - NGINX_WORKER_PROCESSES=auto # Resource limits deploy: resources: limits: cpus: '0.5' memory: 256M reservations: cpus: '0.25' memory: 128M # Restart policy restart: unless-stopped # Health check healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/health"] interval: 30s timeout: 3s retries: 3 start_period: 5s # Logging logging: driver: "json-file" options: max-size: "10m" max-file: "3" # Security options security_opt: - no-new-privileges:true # Read-only root filesystem (except for nginx cache/logs) read_only: true tmpfs: - /var/cache/nginx:size=10M - /var/run:size=1M - /tmp:size=10M # Networks networks: - valentine-network networks: valentine-network: driver: bridge name: valentine-network