forked from microsoft/planetary-computer-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
209 lines (183 loc) · 7.22 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
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
version: "2.1"
services:
azurite:
container_name: pctasks-azurite
image: mcr.microsoft.com/azure-storage/azurite:3.23.0
hostname: azurite
command: "azurite --silent --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost
0.0.0.0 -l /workspace"
ports:
- "10000:10000" # Blob
- "10001:10001" # Queue
- "10002:10002" # Table
volumes:
- pctasks-azurite-data:/workspace
database:
container_name: pctasks-database
image: ghcr.io/stac-utils/pgstac:v0.7.3
environment:
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgis
- PGUSER=username
- PGPASSWORD=password
- PGDATABASE=postgis
ports:
- "5499:5432"
volumes:
- pctasks-pgdata:/var/lib/postgresql/data
command: postgres -N 500
nginx:
image: pctasks-nginx
container_name: pctasks-nginx
build:
context: ./dev/nginx
dockerfile: Dockerfile
volumes:
- ./dev/nginx/etc/nginx:/etc/nginx
ports:
- 8510:80
depends_on:
- server
server:
container_name: pctasks-server
image: pctasks-server
build:
context: pctasks
dockerfile: server/Dockerfile
args:
- DEVELOPMENT=TRUE
environment:
- APP_ROOT_PATH=/tasks
- APP_PORT=8511
- WEB_CONCURRENCY=1
- AZURE_TENANT_ID
- AZURE_CLIENT_ID
- AZURE_CLIENT_SECRET
- PCTASKS_SERVER__DEV=true
- PCTASKS_SERVER__DEV_API_KEY=hunter2
- PCTASKS_SERVER__DEV_AUTH_TOKEN=Bearer hunter2
# Dev storage settings
- AZURITE_HOST=azurite
- AZURITE_PORT=10000
- AZURITE_STORAGE_ACCOUNT=devstoreaccount1
# Local secrets provider secrets
- SECRETS_DB_CONNECTION_STRING=postgresql://username:password@database:5432/postgis
# Run settings #######################################################
# Dev executor settings
- PCTASKS_RUN__TASK_RUNNER_TYPE=${PCTASKS_RUN__TASK_RUNNER_TYPE:-local}
- PCTASKS_RUN__LOCAL_DEV_ENDPOINTS_URL=http://local-dev-endpoints:8512
- PCTASKS_RUN__LOCAL_SECRETS=${PCTASKS_RUN__LOCAL_SECRETS:-true}
- PCTASKS_RUN__WORKFLOW_RUNNER_TYPE=local
## Azure Batch
- PCTASKS_RUN__BATCH_URL
- PCTASKS_RUN__BATCH_KEY
- PCTASKS_RUN__BATCH_DEFAULT_POOL_ID
## Key Vault
- PCTASKS_RUN__KEYVAULT_URL
## Azure Storage
### Queues
- PCTASKS_RUN__NOTIFICATION_QUEUE__CONNECTION_STRING=DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;QueueEndpoint=http://azurite:10001/devstoreaccount1;
- PCTASKS_RUN__INBOX_QUEUE__CONNECTION_STRING=DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;QueueEndpoint=http://azurite:10001/devstoreaccount1;
- PCTASKS_RUN__SIGNAL_QUEUE__CONNECTION_STRING=DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;QueueEndpoint=http://azurite:10001/devstoreaccount1;
- PCTASKS_RUN__SIGNAL_QUEUE_ACCOUNT_NAME=devstoreaccount1
- PCTASKS_RUN__SIGNAL_QUEUE_ACCOUNT_KEY=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
### Tables
- PCTASKS_RUN__TABLES_ACCOUNT_URL=http://azurite:10002/devstoreaccount1
- PCTASKS_RUN__TABLES_ACCOUNT_NAME=devstoreaccount1
- PCTASKS_RUN__TABLES_ACCOUNT_KEY=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
### Cosmos DB
- COSMOSDB_EMULATOR_HOST=cosmosdb
- PCTASKS_COSMOSDB__URL=${PCTASKS_COSMOSDB__URL:-https://cosmosdb:8081/}
- PCTASKS_COSMOSDB__KEY=${PCTASKS_COSMOSDB__KEY:-C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==}
- PCTASKS_COSMOSDB__TEST_CONTAINER_SUFFIX
### Blobs
- PCTASKS_RUN__BLOB_ACCOUNT_URL=http://azurite:10000/devstoreaccount1
- PCTASKS_RUN__BLOB_ACCOUNT_NAME=devstoreaccount1
- PCTASKS_RUN__BLOB_ACCOUNT_KEY=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
volumes:
- ./pctasks:/opt/src
ports:
- "8511:8511"
command: >
bash -c "uvicorn pctasks.server.main:app --host 0.0.0.0 --port 8511 --reload --proxy-headers"
local-dev-endpoints:
# HTTP endpoints for running tasks and serving secrets
container_name: pctasks-local-dev-endpoints
image: pctasks-dev
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "8512:8512"
volumes:
- .:/opt/src
environment:
- APP_PORT=8512
# Dev storage settings
- AZURITE_HOST=azurite
- AZURITE_PORT=10000
- AZURITE_STORAGE_ACCOUNT=devstoreaccount1
# Local dev secrets file
- DEV_SECRETS_FILE=/opt/src/dev-secrets.yaml
command:
[
"uvicorn",
"pctasks.dev.local_dev_endpoints:app",
"--host",
"0.0.0.0",
"--port",
"8512",
"--reload",
"--proxy-headers"
]
frontend:
container_name: pctasks-frontend-app
image: node:16.16-slim
working_dir: /usr/src/app
env_file:
- "pctasks_frontend/.env"
ports:
- "8515:8515"
environment:
- CHOKIDAR_USEPOLLING=true
- CHOKIDAR_INTERVAL=100
- REACT_APP_DEV_AUTH_TOKEN=${REACT_APP_DEV_AUTH_TOKEN:-hunter2}
volumes:
- ./pctasks_frontend:/usr/src/app
command: "npm start"
# Used to let kind cluster pull local docker images
# See https://kind.sigs.k8s.io/docs/user/local-registry/
local-docker-registry:
container_name: pctasks-local-docker-reg
image: registry:2
ports:
- 5001:5000
functions:
container_name: pctasks-functions
image: pctasks-functions
build:
context: .
dockerfile: pctasks_funcs/Dockerfile
volumes:
- ./pctasks:/home/site/pctasks
- ./pctasks_funcs:/home/site/wwwroot
ports:
- "7071:7071" # Functions
environment:
- AzureWebJobsStorage=DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;QueueEndpoint=http://azurite:10001/devstoreaccount1;TableEndpoint=http://azurite:10002/devstoreaccount1;
- WEBSITE_HOSTNAME=functions:7071
# Must use IP address to avoid SSL errors
- PCTASKS_COSMOSDB__URL=${PCTASKS_COSMOSDB__URL:-https://172.16.238.246:8081/}
- PCTASKS_COSMOSDB__KEY=${PCTASKS_COSMOSDB__KEY:-C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==}
# Set trigger app setting separately to avoid issues with __ in env var names
- FUNC_COSMOSDB_CONN_STR=AccountEndpoint=${PCTASKS_COSMOSDB__URL:-https://172.16.238.246:8081/};AccountKey=${PCTASKS_COSMOSDB__KEY:-C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==};
- COSMOSDB_EMULATOR_HOST=172.16.238.246
networks:
default:
# Network created during scripts/setup
external:
name: pctasks-network
volumes:
pctasks-azurite-data: null
pctasks-pgdata: null