Files
terra-view/docker-compose.yml

82 lines
2.0 KiB
YAML

services:
# --- TERRA-VIEW (PRODUCTION) ---
# Unified application: UI + Seismograph logic + SLM dashboard/proxy
# Only external HTTP dependency: SLMM backend for NL-43 device communication
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
- SLMM_API_URL=http://localhost:8100 # Points to SLMM container
restart: unless-stopped
depends_on:
- slmm
command: python3 -m app.main # Runs full Terra-View (UI + seismo + SLM)
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# --- TERRA-VIEW (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
- SLMM_API_URL=http://localhost:8100
restart: unless-stopped
depends_on:
- 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
# --- SLMM (Sound Level Meter Manager) ---
slmm:
build:
context: .
dockerfile: Dockerfile.slm
container_name: slmm
network_mode: host
volumes:
- ./data-slm:/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:
data-slm: