-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathdocker-compose.yaml
45 lines (44 loc) · 1.57 KB
/
docker-compose.yaml
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
version: '3.4'
# Default compose will create an ows image, with dev settings and connect to a local db
services:
ows:
build:
context: .
args:
PYDEV_DEBUG: "${PYDEV_DEBUG}"
cache_from:
- opendatacube/ows:_builder
image: opendatacube/ows:latest
# Uncomment for use with non-dockerised postgres (for docker-compose 1.x)
# network_mode: host
environment:
# Defaults are defined in .env file
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_REQUEST_PAYER: ${AWS_REQUEST_PAYER}
AWS_S3_ENDPOINT: ${AWS_S3_ENDPOINT}
DB_HOSTNAME: ${DB_HOSTNAME}
DB_PORT: ${DB_PORT}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
DB_DATABASE: ${DB_DATABASE}
# Path from the PYTHONPATH to the config object (default PYTHONPATH is /env)
PYTHONPATH: ${PYTHONPATH}
DATACUBE_OWS_CFG: ${DATACUBE_OWS_CFG}
AWS_DEFAULT_REGION: ${AWS_REGION}
# Talk to AWS without using credentials
AWS_NO_SIGN_REQUEST: "${AWS_NO_SIGN_REQUEST}"
# Enable Metrics
prometheus_multiproc_dir: ${prometheus_multiproc_dir}
# Dev flags
FLASK_APP: /code/datacube_ows/ogc.py
FLASK_ENV: ${FLASK_ENV}
PYDEV_DEBUG: "${PYDEV_DEBUG}"
SENTRY_DSN: "${SENTRY_DSN}"
volumes:
- ${OWS_CFG_DIR}:${OWS_CFG_MOUNT_DIR}
- ./docker/ows/wait-for-db:/usr/local/bin/wait-for-db
- ./:/code/
- ./artifacts:/mnt/artifacts
restart: always
command: ["wait-for-db", "flask", "run", "--host=0.0.0.0", "--port=8000"]