Nettoyage et construction micro services
This commit is contained in:
+23
-15
@@ -1,4 +1,17 @@
|
||||
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:
|
||||
@@ -6,9 +19,6 @@ services:
|
||||
dockerfile: ui/Dockerfile
|
||||
ports:
|
||||
- "${CARIA_PORT:-8080}:80"
|
||||
depends_on:
|
||||
telemetry:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1/"]
|
||||
@@ -16,21 +26,19 @@ services:
|
||||
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}
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user