83 lines
2.0 KiB
YAML
83 lines
2.0 KiB
YAML
services:
|
|
watermaps:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: watermaps:local
|
|
ports:
|
|
- "${WATERMAPS_HTTP_PORT:-5173}:5174"
|
|
environment:
|
|
NODE_ENV: production
|
|
HOST: 0.0.0.0
|
|
PORT: 5174
|
|
DATABASE_URL: ""
|
|
REDIS_URL: ""
|
|
WATERMAPS_WEB_DIST_PATH: /app/apps/web/dist
|
|
WATERMAPS_LOCAL_FAIRWAYS_PATH: /data/germany-netherlands-fairways.json
|
|
WATERMAPS_LIVE_FAIRWAYS: "false"
|
|
WATERMAPS_DEMO_DATA: "true"
|
|
volumes:
|
|
- type: bind
|
|
source: ./data/local
|
|
target: /data
|
|
read_only: true
|
|
bind:
|
|
create_host_path: false
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD",
|
|
"node",
|
|
"-e",
|
|
"fetch('http://127.0.0.1:5174/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"
|
|
]
|
|
interval: 30s
|
|
timeout: 5s
|
|
start_period: 10s
|
|
retries: 3
|
|
|
|
postgres:
|
|
profiles: ["postgis"]
|
|
image: postgis/postgis:16-3.4
|
|
environment:
|
|
POSTGRES_DB: seacompass
|
|
POSTGRES_USER: seacompass
|
|
POSTGRES_PASSWORD: seacompass
|
|
ports:
|
|
- "${WATERMAPS_POSTGRES_PORT:-${SEA_COMPASS_POSTGRES_PORT:-55432}}:5432"
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
- ./database/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U seacompass -d seacompass"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
profiles: ["postgis"]
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
martin:
|
|
profiles: ["postgis"]
|
|
image: ghcr.io/maplibre/martin:latest
|
|
command: ["--config", "/config/martin.yaml"]
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- ./database/martin.yaml:/config/martin.yaml:ro
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
postgres-data:
|