forked from NASA-AMMOS/MMGIS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
189 lines (181 loc) · 5.25 KB
/
docker-compose.dev.yml
File metadata and controls
189 lines (181 loc) · 5.25 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
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
# Development Docker Compose with hot-reloading
#
# Usage:
# docker-compose -f docker-compose.dev.yml up --build
#
# With STAC services:
# docker-compose -f docker-compose.dev.yml --profile stac up --build
services:
mmgis:
build:
context: .
args:
- WITH_STAC=${WITH_STAC:-true}
depends_on:
db:
condition: service_healthy
env_file: .env
environment:
- NODE_ENV=development
- WITH_STAC=${WITH_STAC:-true}
- DB_HOST=db
# Hot-reloading: run npm start instead of production build
command: >
bash -c "source ~/.bashrc &&
if [ \"$$WITH_STAC\" = 'true' ]; then micromamba activate mmgis; fi &&
npm start"
ports:
- 8888:8888
- 8889:8889
healthcheck:
test: ["CMD", "curl", "-XGET", "-k", "http://mmgis:8888/api/utils/healthcheck"]
interval: 20s
retries: 5
start_period: 30s
timeout: 8s
volumes:
# Mount source for hot-reloading
- .:/usr/src/app
# Exclude node_modules to prevent native module conflicts
- /usr/src/app/node_modules
# Preserve configure/build from image
- /usr/src/app/configure/build
stac-fastapi:
profiles: ["stac"]
image: ghcr.io/stac-utils/stac-fastapi-pgstac:5.0.2
ports:
- 8881
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASS=${DB_PASS}
- 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
db:
condition: service_healthy
command: bash -c "uvicorn stac_fastapi.pgstac.app:app --host 0.0.0.0 --port 8881"
volumes:
- ./Missions:/Missions
tipg:
profiles: ["stac"]
image: ghcr.io/developmentseed/tipg:1.1.0
ports:
- 8882
environment:
- HOST=0.0.0.0
- PORT=8882
- WEB_CONCURRENCY=10
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASS=${DB_PASS}
- POSTGRES_DBNAME=mmgis-stac
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- DB_MIN_CONN_SIZE=1
- DB_MAX_CONN_SIZE=10
command: bash -c "uvicorn tipg.main:app --host 0.0.0.0 --port 8882"
depends_on:
mmgis:
condition: service_healthy
db:
condition: service_healthy
volumes:
- ./Missions:/Missions
titiler:
profiles: ["stac"]
platform: linux/amd64
image: ghcr.io/developmentseed/titiler:0.22.2
ports:
- 8883
environment:
- HOST=0.0.0.0
- PORT=8883
- WEB_CONCURRENCY=1
- 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
- TILEMATRIXSET_DIRECTORY=/adjacent-servers/resources/tilematrixsets/planetcantile_v4
volumes:
- ./Missions:/Missions
- ./adjacent-servers/resources:/adjacent-servers/resources
titiler-pgstac:
profiles: ["stac"]
platform: linux/amd64
image: ghcr.io/stac-utils/titiler-pgstac:1.8.0
ports:
- 8884
environment:
- HOST=0.0.0.0
- PORT=8884
- WEB_CONCURRENCY=1
- WORKERS_PER_CORE=1
- MAX_WORKERS=10
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASS=${DB_PASS}
- POSTGRES_DBNAME=mmgis-stac
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- DB_MIN_CONN_SIZE=1
- DB_MAX_CONN_SIZE=10
- 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
- MOSAIC_CONCURRENCY=1
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-}
- TITILER_PGSTAC_SEARCH_EXITWHENFULL=FALSE
- TITILER_PGSTAC_SEARCH_SKIPCOVERED=FALSE
- TILEMATRIXSET_DIRECTORY=/adjacent-servers/resources/tilematrixsets/planetcantile_v4
depends_on:
mmgis:
condition: service_healthy
db:
condition: service_healthy
command: bash -c "uvicorn titiler.pgstac.main:app --host 0.0.0.0 --port 8884"
volumes:
- ./Missions:/Missions
- ./adjacent-servers/resources:/adjacent-servers/resources
veloserver:
profiles: ["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=${DB_PASS}
ports:
- 5432:5432
shm_size: '1g'
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-dev-db:/var/lib/postgresql/data
volumes:
mmgis-dev-db: