# NDMA Flood Early-Warning Portal — production deployment. # docker compose up -d --build # Secrets stay OUT of the image: .env is injected as environment # variables, credentials/ and data/ are mounted at runtime. services: ndma-flood: build: . container_name: ndma-flood ports: - "5000:5000" env_file: - .env environment: # cdsapi credentials for GloFAS (container path, not Windows path) CDSAPI_RC: /app/credentials/cdsapi.json # chat fallback: reach Ollama running on the HOST machine CHATBOT_OLLAMA_URL: http://host.docker.internal:11434/v1 volumes: - ./credentials:/app/credentials:ro - ./data:/app/data extra_hosts: - "host.docker.internal:host-gateway" restart: unless-stopped healthcheck: test: ["CMD", "python", "-c", "import urllib.request as u; u.urlopen('http://localhost:5000/api/health', timeout=5)"] interval: 60s timeout: 10s retries: 3 start_period: 30s