-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
153 lines (144 loc) · 4.46 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
version: '3'
services:
stac:
container_name: veda.stac
build:
context: .
dockerfile: local/Dockerfile.stac
ports:
- "8081:8081"
environment:
- APP_HOST=0.0.0.0
- APP_PORT=8081
- HOST=0.0.0.0
- PORT=8081
- ENVIRONMENT=local
# 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=postgis
- POSTGRES_HOST_READER=database
- POSTGRES_HOST_WRITER=database
- POSTGRES_PORT=5432
- DB_MIN_CONN_SIZE=1
- DB_MAX_CONN_SIZE=10
# https://github.com/developmentseed/eoAPI/issues/16
# - TITILER_ENDPOINT=raster
- TITILER_ENDPOINT=http://0.0.0.0:8082
depends_on:
- database
- raster
command: bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start.sh"
volumes:
- ./scripts:/tmp/scripts
raster:
container_name: veda.raster
platform: linux/amd64
build:
context: .
dockerfile: local/Dockerfile.raster
ports:
- "8082:8082"
environment:
# Application
- HOST=0.0.0.0
- PORT=8082
# 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=postgis
- POSTGRES_HOST=database
- 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}
# API Config
- VEDA_RASTER_ENABLE_MOSAIC_SEARCH=TRUE
- VEDA_RASTER_EXPORT_ASSUME_ROLE_CREDS_AS_ENVS=TRUE
depends_on:
- database
command: bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start.sh"
volumes:
- ./scripts:/tmp/scripts
- $HOME/.aws/credentials:/root/.aws/credentials
database:
container_name: veda.db
platform: linux/amd64
image: ghcr.io/stac-utils/pgstac:v0.7.10
environment:
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgis
- PGUSER=username
- PGPASSWORD=password
- PGDATABASE=postgis
ports:
- "5432:5432"
command: postgres -N 500
volumes:
- ./scripts:/tmp/scripts
- ./.github/workflows/data:/tmp/data
# broken in github actions (definitely when run in act, possibly in tests involving ingest-api)? re-enable to persist local database
# - ./.pgdata:/var/lib/postgresql/data
ingestor:
container_name: veda.ingestor
platform: linux/amd64
build:
context: .
dockerfile: local/Dockerfile.ingest
environment:
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgis
- PGUSER=username
- PGPASSWORD=password
- PGDATABASE=postgis
- DYNAMODB_ENDPOINT=http://localhost:8085
- VEDA_DB_PGSTAC_VERSION=0.7.10
ports:
- "8083:8083"
command: bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && python /asset/local.py"
volumes:
- ./scripts:/tmp/scripts
- $HOME/.aws/credentials:/root/.aws/credentials
dynamodb:
image: amazon/dynamodb-local
container_name: veda.dynamodb
hostname: dynamodb
restart: always
volumes:
- ./dynamodb-data:/home/dynamodblocal/data
ports:
- 8085:8000 # skip 8084 for github actions to work
command: "-jar DynamoDBLocal.jar -sharedDb -dbPath /home/dynamodblocal/data/"
networks:
default:
name: veda-network