-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
136 lines (134 loc) · 4.1 KB
/
docker-compose.yml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
services:
processing:
image: public.ecr.aws/n0p8j4k5/atlas/processing:${ENVIRONMENT}-latest
container_name: processing
environment:
PGHOST: ${DATABASE_HOST}
PGDATABASE: ${DATABASE_NAME}
PGUSER: ${DATABASE_USER}
PGPASSWORD: ${DATABASE_PASSWORD}
GEO_DATABASE_URL: postgresql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}/${DATABASE_NAME}?pool_timeout=0
OSM_DOWNLOAD_URL:
SKIP_UNCHANGED:
SKIP_DOWNLOAD:
SKIP_TAG_FILTER:
WAIT_FOR_FRESH_DATA:
SKIP_WARM_CACHE:
TILES_URL:
ID_FILTER:
ENVIRONMENT:
SYNOLOGY_LOG_TOKEN:
SYNOLOGY_ERROR_LOG_TOKEN:
SYNOLOGY_URL:
COMPUTE_DIFFS:
FREEZE_DATA:
ATLAS_API_KEY:
FORCE_COLOR: 1
volumes:
- osmfiles:/data
- geodata:/data/db
- /var/run/docker.sock:/var/run/docker.sock
- ./cache:/var/cache/nginx
- ./app/src/processingTypes:/data/processingTypes
depends_on:
db:
condition: service_healthy
logging:
driver: journald
app:
image: public.ecr.aws/n0p8j4k5/atlas/app:${ENVIRONMENT}-latest
container_name: app
restart: unless-stopped
environment:
DATABASE_URL: postgresql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}/${DATABASE_NAME}?schema=prisma
GEO_DATABASE_URL: postgresql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}/${DATABASE_NAME}?pool_timeout=0
NEXT_PUBLIC_APP_ENV:
NEXT_PUBLIC_OSM_API_URL:
NEXT_PUBLIC_APP_ORIGIN:
SESSION_SECRET_KEY:
OSM_CLIENT_ID:
OSM_CLIENT_SECRET:
ATLAS_API_KEY:
S3_KEY:
S3_SECRET:
S3_REGION:
S3_BUCKET:
FORCE_COLOR: 1
ports:
- 4000:4000
labels:
traefik.enable: true
traefik.http.services.container.loadbalancer.server.port: 4000
traefik.http.routers.container.rule: Host(`${APP_URL}`) || Host(`www.${APP_URL}`)
traefik.http.routers.container.entrypoints: websecure
traefik.http.routers.container.tls.certresolver: letsencrypt
traefik.http.routers.container.tls: true
depends_on:
db:
condition: service_healthy
tiles:
condition: service_started
logging:
driver: journald
tiles:
image: ghcr.io/maplibre/martin:v0.14.2
container_name: tiles
command: "--config /config.yaml"
restart: unless-stopped
environment:
DATABASE_URL: postgres://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}/${DATABASE_NAME}
# https://maplibre.org/martin/troubleshooting.html?highlight=log#troubleshooting
# RUST_LOG: actix_web=info,martin=debug,tokio_postgres=debug
RUST_LOG: actix_web=info,martin=info,tokio_postgres=info
TZ: Europe/Berlin
labels:
traefik.enable: true
traefik.http.routers.tiles.rule: Host(`${CACHELESS_URL}`)
traefik.http.routers.tiles.entrypoints: websecure
traefik.http.routers.tiles.tls.certresolver: letsencrypt
traefik.http.routers.tiles.tls: true
ports:
- 3000:3000
configs:
- source: martin_conf
target: /config.yaml
depends_on:
db:
condition: service_healthy
db:
image: postgis/postgis:14-3.4-alpine
container_name: ${DATABASE_HOST}
shm_size: 1g
restart: unless-stopped
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_DB: ${DATABASE_NAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
TZ: Europe/Berlin
ports:
- "5432:5432"
volumes:
- geodata:/var/lib/postgresql/data
configs:
- source: postgres_conf
target: /postgresql/postgresql.conf
- source: postgres_init
target: /docker-entrypoint-initdb.d/11-postgres.sql
command: ["-c", "config_file=/postgresql/postgresql.conf"]
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DATABASE_USER} -d ${DATABASE_NAME}"]
interval: 5s
timeout: 5s
retries: 5
volumes:
geodata:
osmfiles:
configs:
martin_conf:
file: ./configs/martin.yaml
postgres_init:
file: ./configs/postgres-init.sql
postgres_conf:
file: ./configs/postgres.conf