-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathdocker-compose.sample.yml
216 lines (210 loc) · 6.46 KB
/
docker-compose.sample.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
services:
mmgis:
# build: .
image: ghcr.io/nasa-ammos/mmgis:development
depends_on:
db:
condition: service_healthy
restart: true
env_file: .env
ports:
- 8888:8888
healthcheck:
# Use https if using HTTPS= env
test:
[
"CMD",
"curl",
"-XGET",
"-k",
"http://mmgis:8888/API/utils/healthcheck",
]
interval: 20s
retries: 5
start_period: 15s
timeout: 8s
restart: on-failure
volumes:
- ./Missions:/usr/src/app/Missions
- ./ssl:/usr/src/app/ssl
stac-fastapi:
image: ghcr.io/stac-utils/stac-fastapi-pgstac:3.0.0
ports:
- 8881
environment:
# Postgres connection
- POSTGRES_USER=username
- POSTGRES_PASS=password
- POSTGRES_DBNAME=mmgis-stac
- POSTGRES_HOST_READER=db
- POSTGRES_HOST_WRITER=db
- POSTGRES_PORT=5432
- DB_MIN_CONN_SIZE=1
- DB_MAX_CONN_SIZE=1
depends_on:
mmgis:
condition: service_healthy
restart: true
db:
condition: service_healthy
restart: true
command: bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h db -p 5432 && uvicorn stac_fastapi.pgstac.app:app --host 0.0.0.0 --port 8881"
volumes:
- ./adjacent-servers/docker-scripts:/tmp/scripts
- ./Missions:/Missions
tipg:
image: ghcr.io/developmentseed/tipg:0.7.2
ports:
- 8882
environment:
# Application
- HOST=0.0.0.0
- PORT=8882
# https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency
- WEB_CONCURRENCY=10
# https://github.com/tiangolo/uvicorn-gunicorn-docker#workers_per_core
# - WORKERS_PER_CORE=1
# https://github.com/tiangolo/uvicorn-gunicorn-docker#max_workers
# - MAX_WORKERS=10
# Postgres connection
- POSTGRES_USER=username
- POSTGRES_PASS=password
- POSTGRES_DBNAME=mmgis-stac
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- DB_MIN_CONN_SIZE=1
- DB_MAX_CONN_SIZE=10
command: bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h db -p 5432 && /start.sh"
depends_on:
mmgis:
condition: service_healthy
restart: true
db:
condition: service_healthy
restart: true
volumes:
- ./adjacent-servers/docker-scripts:/tmp/scripts
- ./Missions:/Missions
titiler:
# TODO: remove once https://github.com/rasterio/rasterio-wheels/issues/69 is resolved
# See https://github.com/developmentseed/titiler/discussions/387
platform: linux/amd64
image: ghcr.io/developmentseed/titiler-uvicorn:0.18.6
ports:
- 8883
environment:
# Application
- HOST=0.0.0.0
- PORT=8883
# Uvicorn
# http://www.uvicorn.org/settings/#production
- WEB_CONCURRENCY=1
# GDAL config
- CPL_TMPDIR=/tmp
- GDAL_CACHEMAX=75%
- GDAL_INGESTED_BYTES_AT_OPEN=32768
- GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR
- GDAL_HTTP_MERGE_CONSECUTIVE_RANGES=YES
- GDAL_HTTP_MULTIPLEX=YES
- GDAL_HTTP_VERSION=2
- PYTHONWARNINGS=ignore
- VSI_CACHE=TRUE
- VSI_CACHE_SIZE=536870912
# GDAL VSI Config
# https://gdal.org/user/virtual_file_systems.html#vsis3-aws-s3-files
# https://gdal.org/user/virtual_file_systems.html#vsigs-google-cloud-storage-files
# https://gdal.org/user/virtual_file_systems.html#vsiaz-microsoft-azure-blob-files
# - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
# - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
# TiTiler config
# - TITILER_API_DISABLE_STAC=TRUE/FALSE
# - TITILER_API_DISABLE_MOSAIC=TRUE/FALSE
# - TITILER_API_DISABLE_COG=TRUE/FALSE
# - TITILER_API_CORS_ORIGIN=url.io,url.xyz
# - TITILER_API_CACHECONTROL=public, max-age=3600
# - TITILER_API_DEBUG=TRUE/FALSE
# - MOSAIC_CONCURRENCY= # will default to `RIO_TILER_MAX_THREADS`
# rio-tiler config
# - RIO_TILER_MAX_THREADS=
volumes:
- ./Missions:/Missions
titiler-pgstac:
# At the time of writing, rasterio and psycopg wheels are not available for arm64 arch
# so we force the image to be built with linux/amd64
platform: linux/amd64
image: ghcr.io/stac-utils/titiler-pgstac:1.4.0
ports:
- 8884
environment:
# Application
- HOST=0.0.0.0
- PORT=8884
# https://github.com/tiangolo/uvicorn-gunicorn-docker#web_concurrency
- WEB_CONCURRENCY=1
# https://github.com/tiangolo/uvicorn-gunicorn-docker#workers_per_core
- WORKERS_PER_CORE=1
# https://github.com/tiangolo/uvicorn-gunicorn-docker#max_workers
- MAX_WORKERS=10
# Postgres connection
- POSTGRES_USER=username
- POSTGRES_PASS=password
- POSTGRES_DBNAME=mmgis-stac
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- DB_MIN_CONN_SIZE=1
- DB_MAX_CONN_SIZE=10
# - DB_MAX_QUERIES=10
# - DB_MAX_IDLE=10
# GDAL Config
- CPL_TMPDIR=/tmp
- GDAL_CACHEMAX=75%
- GDAL_INGESTED_BYTES_AT_OPEN=32768
- GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR
- GDAL_HTTP_MERGE_CONSECUTIVE_RANGES=YES
- GDAL_HTTP_MULTIPLEX=YES
- GDAL_HTTP_VERSION=2
- VSI_CACHE=TRUE
- VSI_CACHE_SIZE=536870912
# TiTiler Config
- MOSAIC_CONCURRENCY=1
# AWS S3 endpoint config
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
# TiTiler pgSTAC
- TITILER_PGSTAC_SEARCH_EXITWHENFULL=FALSE
- TITILER_PGSTAC_SEARCH_SKIPCOVERED=FALSE
depends_on:
mmgis:
condition: service_healthy
restart: true
db:
condition: service_healthy
restart: true
command: bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h db -p 5432 && /start.sh"
volumes:
- ./Missions:/Missions
- ./adjacent-servers/docker-scripts:/tmp/scripts
veloserver:
image: ghcr.io/nasa-ammos/veloserver:development
ports:
- 8104
restart: on-failure
db:
image: postgis/postgis:16-3.4-alpine
env_file: .env
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD_OFF=Rename to 'POSTGRES_PASSWORD' and replace this with an initial root password for the DB
ports:
- 5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -d postgres -U ${DB_USER}"]
interval: 10s
retries: 10
start_period: 10s
timeout: 8s
restart: on-failure
volumes:
- mmgis-db:/var/lib/postgresql/data
volumes:
mmgis-db: