-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
69 lines (63 loc) · 2.11 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
version: '3.2'
services:
api:
build:
context: .
dockerfile: Dockerfiles/ecs/Dockerfile
ports:
- "8000:8000"
volumes:
- type: bind
source: ./covid_api
target: /app/covid_api
environment:
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_ENDPOINT_URL=http://localstack:4566
- CPL_TMPDIR=/tmp
- GDAL_CACHEMAX=75%
- GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR
- GDAL_HTTP_MERGE_CONSECUTIVE_RANGES=YES
- GDAL_HTTP_MULTIPLEX=YES
- GDAL_HTTP_VERSION=2
- MODULE_NAME=covid_api.main
- MEMCACHE_HOST=memcached
- MEMCACHE_USERNAME=myuser
- MEMCACHE_PASSWORD=mypassword
- DISABLE_CACHE=yesplase
- PLANET_API_KEY=${PLANET_API_KEY}
- DATASET_METADATA_FILENAME=dev-dataset-metadata.json
- DATASET_METADATA_GENERATOR_FUNCTION_NAME=dev-dataset-metadata-generator
- PORT=8000
- PYTHONWARNINGS=ignore
- VARIABLE_NAME=app
- VSI_CACHE=TRUE
- VSI_CACHE_SIZE=536870912
- WORKERS_PER_CORE=5
# localstack for local development only. AWS S3 used for staging/production
localstack:
image: localstack/localstack:0.12.7
environment:
SERVICES: s3
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_ENDPOINT_URL: http://localhost:4566
AWS_DEFAULT_REGION: us-east-1
HOSTNAME: localhost
HOSTNAME_EXTERNAL: localhost
DATA_BUCKET_NAME: covid-eo-data
DATASET_METADATA_FILENAME: dev-dataset-metadata.json
ports:
- "4566:4566"
volumes:
- ./localstack/setup.sh:/docker-entrypoint-initaws.d/setup.sh
- ./lambda/dataset_metadata_generator/src/main.py:/docker-entrypoint-initaws.d/main.py
- ./covid_api/db/static/datasets:/docker-entrypoint-initaws.d/datasets
- ./covid_api/db/static/sites:/docker-entrypoint-initaws.d/sites
memcached:
image: remotepixel/memcached-sasl:latest
environment:
- MEMCACHED_USERNAME=myuser
- MEMCACHED_PASSWORD=mypassword
ports:
- "11211:11211"