services: markov-economics: build: . ports: - "5000:5000" environment: - FLASK_ENV=production - FLASK_APP=run.py - PYTHONUNBUFFERED=1 volumes: # Optional: Mount for persistent data if needed - ./data:/app/data restart: unless-stopped healthcheck: test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:5000/health', timeout=2)"] interval: 30s timeout: 10s retries: 3 start_period: 40s networks: - markov-network caddy: image: caddy:2-alpine ports: - "80:80" - "443:443" volumes: - ./Caddyfile:/etc/caddy/Caddyfile - caddy_data:/data - caddy_config:/config depends_on: - markov-economics restart: unless-stopped networks: - markov-network networks: markov-network: driver: bridge volumes: markov-data: driver: local caddy_data: driver: local caddy_config: driver: local