Files

45 lines
1.2 KiB
YAML

name: caria
x-api: &api
build:
context: .
dockerfile: server/Dockerfile
restart: unless-stopped
read_only: true
cap_drop: [ALL]
security_opt: ["no-new-privileges:true"]
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:8080/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
interval: 15s
timeout: 3s
retries: 3
services:
interface:
build:
context: .
dockerfile: ui/Dockerfile
ports:
- "${CARIA_PORT:-8080}:80"
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1/"]
interval: 30s
timeout: 3s
retries: 3
telemetry:
<<: *api
environment:
SERVICE_ROLE: telemetry
weather:
<<: *api
environment:
SERVICE_ROLE: weather
WEATHER_URL: ${WEATHER_URL:-https://api.open-meteo.com/v1/forecast}
navigation:
<<: *api
environment:
SERVICE_ROLE: navigation
GEOCODER_URL: ${GEOCODER_URL:-https://photon.komoot.io/api/}
ROUTER_URL: ${ROUTER_URL:-https://router.project-osrm.org/route/v1/driving/}
TILE_URL: ${TILE_URL:-}
TILE_ATTRIBUTION: ${TILE_ATTRIBUTION:-© OpenStreetMap contributors}