-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
87 lines (82 loc) · 2.4 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
version: "3.1"
services:
web:
build:
context: .
dockerfile: Dockerfile
args:
- BASE_TAG=${BASE_TAG:-cameo}
- BUILD_COMMIT=${BUILD_COMMIT:-unknown}
image: gcr.io/dd-decaf-cfbf6/metabolic-ninja:${BRANCH:-latest}
depends_on:
- rabbitmq
- postgres
networks:
default:
DD-DeCaF:
aliases:
- metabolic-ninja
ports:
- "${API_PORT:-8000}:8000"
volumes:
- ".:/app"
environment:
- ENVIRONMENT=${ENVIRONMENT:-development}
- FLASK_APP=src/metabolic_ninja/wsgi.py
- SCRIPT_NAME=${SCRIPT_NAME}
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-http://localhost:4200}
- SENTRY_DSN=${SENTRY_DSN}
- RABBITMQ_HOST=${RABBITMQ_HOST:-rabbitmq}
- MODEL_STORAGE_API=${MODEL_STORAGE_API:-https://api-staging.dd-decaf.eu/model-storage}
- POSTGRES_HOST=${POSTGRES_HOST:-postgres}
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
- POSTGRES_DB_NAME=${POSTGRES_DB_NAME:-metabolic_ninja}
- POSTGRES_USERNAME=${POSTGRES_USERNAME:-postgres}
- POSTGRES_PASS=${POSTGRES_PASS}
- IAM_API=${IAM_API:-https://api-staging.dd-decaf.eu/iam}
- WAREHOUSE_API=${WAREHOUSE_API:-https://api-staging.dd-decaf.eu/warehouse}
worker:
image: gcr.io/dd-decaf-cfbf6/metabolic-ninja:${BRANCH:-latest}
depends_on:
- rabbitmq
networks:
default:
DD-DeCaF:
aliases:
- metabolic-ninja-worker
volumes:
- ".:/app"
environment:
- SENTRY_DSN=${SENTRY_DSN}
- RABBITMQ_HOST=${RABBITMQ_HOST:-rabbitmq}
- POSTGRES_HOST=${POSTGRES_HOST:-postgres}
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
- POSTGRES_DB_NAME=${POSTGRES_DB_NAME:-metabolic_ninja}
- POSTGRES_USERNAME=${POSTGRES_USERNAME:-postgres}
- POSTGRES_PASS=${POSTGRES_PASS}
- SENDGRID_API_KEY=${SENDGRID_API_KEY}
command: python -m metabolic_ninja.worker.main
restart: on-failure
rabbitmq:
image: rabbitmq:3.7
ports:
- "${RABBITMQ_PORT:-6379}:6379"
networks:
- default
postgres:
image: postgres:9.6-alpine
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASS}
volumes:
- /var/lib/postgresql/data
networks:
- default
ports:
- "${POSTGRES_PORT:-5432}:5432"
# Additional services that the `web` service `depends_on` should usually only
# be on the default network and not exposed on the general network, i.e.,
# networks:
# - default
networks:
DD-DeCaF:
external: true