Files
watermaps/docker-compose.yml
BuTzZ 2064570913
Test and publish container images / test (push) Successful in 2m43s
Test and publish container images / publish (push) Successful in 2m56s
Automate immutable production deployments
2026-07-29 13:00:50 +02:00

109 lines
3.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: postgresql://seacompass@postgres:5432/seacompass
PGPASSWORD: "${WATERMAPS_POSTGRES_PASSWORD:-seacompass}"
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: "${WATERMAPS_DEMO_DATA:-false}"
volumes:
- type: bind
source: ./data/local
target: /data
read_only: true
bind:
create_host_path: false
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:5174/ready').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"
]
interval: 30s
timeout: 5s
start_period: 10s
retries: 3
postgres:
image: postgis/postgis:16-3.4
environment:
POSTGRES_DB: seacompass
POSTGRES_USER: seacompass
POSTGRES_PASSWORD: "${WATERMAPS_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
- ./database/migrations:/docker-entrypoint-initdb.d/migrations:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U seacompass -d seacompass"]
interval: 10s
timeout: 5s
retries: 5
marine-data:
profiles: ["postgis"]
build:
context: .
dockerfile: deploy/route-data.Dockerfile
image: watermaps-route-data:local
entrypoint: ["/workspace/deploy/scripts/prepare-marine-features.sh"]
environment:
DATABASE_URL: postgresql://seacompass@postgres:5432/seacompass
PGPASSWORD: "${WATERMAPS_POSTGRES_PASSWORD:-seacompass}"
TMPDIR: /workspace/data/tmp
WATERMAPS_GEOFABRIK_DIR: /workspace/data/geofabrik
WATERMAPS_MARINE_MARKER_PATH: /workspace/data/local/.marine-features.ready
volumes:
- type: bind
source: ./data
target: /workspace/data
depends_on:
postgres:
condition: service_healthy
restart: "no"
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: