forked from indoorequal/indoorequal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
85 lines (79 loc) · 2.4 KB
/
docker-compose.prod.yml
File metadata and controls
85 lines (79 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Docker Compose configuration for production deployment
# Uses immutable PostgreSQL image with pre-imported data
networks:
indoor:
services:
# Martin tile server
martin:
image: ghcr.io/maplibre/martin:1.2.0
command: '--config /config.yaml'
restart: unless-stopped
env_file: .env
networks:
- indoor
volumes:
- './marting_config.yaml:/config.yaml:ro'
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
# PostgREST API
postgrest:
image: postgrest/postgrest:v14.3
restart: unless-stopped
networks:
- indoor
environment:
PGRST_DB_URI: postgres://openmaptiles:openmaptiles@postgres:5432/openmaptiles
PGRST_OPENAPI_SERVER_PROXY_URI: http://127.0.0.1:3000
PGRST_ADMIN_SERVER_PORT: 3001
PGRST_DB_ANON_ROLE: web_anon
PGRST_LOG_LEVEL: info
PGRST_SERVER_TIMING_ENABLED: "true"
PGRST_SERVER_TRACE_HEADER: traceparent
depends_on:
postgres:
condition: service_healthy
# Immutable PostgreSQL with pre-imported data
postgres:
image: "ghcr.io/psumaps/postgis:immutable"
restart: always
networks:
- indoor
ports:
- "5432:5432"
environment:
POSTGRES_DB: openmaptiles
POSTGRES_USER: openmaptiles
POSTGRES_PASSWORD: openmaptiles
# NO VOLUMES - data is baked into the image!
healthcheck:
test: ["CMD-SHELL", "pg_isready -U openmaptiles -d openmaptiles"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# LOD cache service
lod-cache:
image: 'ijo42/lod:test'
command: '--conf /opt/lod_config.toml'
restart: always
networks:
- indoor
ports:
- "1337:1337"
volumes:
- ./lod_config.toml:/opt/lod_config.toml:ro
depends_on:
postgres:
condition: service_healthy
labels:
- "traefik.enable=true"
- "traefik.http.routers.lod2.rule=Host(`tiles2.ijo42.ru`) && PathPrefix(`/tiles`)"
- "traefik.http.routers.lod2.tls.certresolver=ijoresolv"
- "traefik.http.services.lod2.loadbalancer.server.port=1337"
- "traefik.http.routers.lod2.entrypoints=websecure"
- "traefik.http.routers.lod2.middlewares=corspreflight-middleware,ical"
- "traefik.http.middlewares.ical.plugin.ical.AllowSubnet=212.192.64.0/19"
- "traefik.http.middlewares.corspreflight-middleware.plugin.corspreflight.allowCredentials=false"