Files
terra-view/docker-compose.yml
2026-01-09 05:39:43 +00:00

108 lines
2.8 KiB
YAML

services:
# --- TERRA-VIEW UI/ORCHESTRATOR (PRODUCTION) ---
# Serves HTML, proxies to SFM and SLMM backends
terra-view-prod:
build:
context: .
dockerfile: Dockerfile.terraview
container_name: terra-view
network_mode: host
volumes:
- ./data:/app/data
environment:
- PYTHONUNBUFFERED=1
- ENVIRONMENT=production
- PORT=8001
- SFM_API_URL=http://localhost:8002 # New: Points to SFM container
- SLMM_API_URL=http://localhost:8100 # Points to SLMM container
restart: unless-stopped
depends_on:
- sfm
- slmm
command: python3 -m app.main # Runs full Terra-View (UI + orchestration)
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# --- TERRA-VIEW UI/ORCHESTRATOR (DEVELOPMENT) ---
terra-view-dev:
build:
context: .
dockerfile: Dockerfile.terraview
container_name: terra-view-dev
network_mode: host
volumes:
- ./data-dev:/app/data
environment:
- PYTHONUNBUFFERED=1
- ENVIRONMENT=development
- PORT=1001
- SFM_API_URL=http://localhost:8002
- SLMM_API_URL=http://localhost:8100
restart: unless-stopped
depends_on:
- sfm
- slmm
profiles:
- dev
command: python3 -m app.main
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:1001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# --- SFM - SEISMOGRAPH FLEET MODULE (BACKEND API) ---
# Eventually will be API-only, but for now runs same code as Terra-View
sfm:
build:
context: .
dockerfile: Dockerfile.sfm
container_name: sfm
network_mode: host
volumes:
- ./data:/app/data
environment:
- PYTHONUNBUFFERED=1
- ENVIRONMENT=production
- PORT=8002 # Different port from Terra-View
- MODULE_MODE=sfm # Future: Tells app to run SFM-only mode
restart: unless-stopped
command: python3 -m app.main # For now: Same entry point, different port
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8002/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# --- SLMM (Sound Level Meter Manager) ---
slmm:
build:
context: ../../slmm
dockerfile: Dockerfile
container_name: slmm
network_mode: host
volumes:
- ../../slmm/data:/app/data
environment:
- PYTHONUNBUFFERED=1
- PORT=8100
- CORS_ORIGINS=*
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8100/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
data:
data-dev: