-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yml
101 lines (101 loc) · 2.64 KB
/
docker-compose-prod.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
version: '2.1'
services:
api:
build:
dockerfile: Dockerfile
context: ./staging
depends_on:
db:
condition: service_healthy
environment:
SCOUT_API_USER: ${SCOUT_API_USER}
SCOUT_API_PASSWORD: ${SCOUT_API_PASSWORD}
SCOUT_LOGIN_URL: ${SCOUT_LOGIN_URL}
SCOUT_QUERY_URL: ${SCOUT_QUERY_URL}
SCOUT_CACHESTATE_URL: ${SCOUT_CACHESTATE_URL}
SCOUT_STAGE_URL: ${SCOUT_STAGE_URL}
SCOUT_CANCEL_URL: ${SCOUT_CANCEL_URL}
RESULT_USERNAME: ${RESULT_USERNAME}
RESULT_PASSWORD: ${RESULT_PASSWORD}
STAGING_LOGDIR: ${STAGING_LOGDIR}
KAFKA_TOPIC: ${KAFKA_TOPIC}
DBUSER: ${DBUSER}
DBPASSWORD: ${DBPASSWORD}
DBHOST: ${DBHOST}
DBNAME: ${DBNAME}
volumes:
- ./staging:/usr/src/app
- /var/log/staging:/var/log/staging
db:
user: postgres
build:
dockerfile: Dockerfile
context: ./postgres
restart: always
environment:
POSTGRES_USER: ${DBUSER}
POSTGRES_PASSWORD: ${DBPASSWORD}
POSTGRES_DB: ${DBNAME}
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- pgdata:/var/lib/postgresql/data
stop_grace_period: 10s
nginx:
build:
dockerfile: Dockerfile
context: ./nginx
ports:
- '443:443'
- '80:80'
depends_on:
- "api"
volumes:
- ./config:/etc/nginx/certs
kafkad:
build:
dockerfile: Dockerfile
context: ./staging
command: pipenv run python -u kafkad.py
tty: true
depends_on:
db:
condition: service_healthy
environment:
PYTHONUNBUFFERED: 1
KAFKA_TOPIC: ${KAFKA_TOPIC}
KAFKA_SERVER: ${KAFKA_SERVER}
KAFKA_USER: ${KAFKA_USER}
KAFKA_PASSWORD: ${KAFKA_PASSWORD}
RESULT_USERNAME: ${RESULT_USERNAME}
RESULT_PASSWORD: ${RESULT_PASSWORD}
SCOUT_API_USER: ${SCOUT_API_USER}
SCOUT_API_PASSWORD: ${SCOUT_API_PASSWORD}
SCOUT_LOGIN_URL: ${SCOUT_LOGIN_URL}
SCOUT_QUERY_URL: ${SCOUT_QUERY_URL}
SCOUT_STAGE_URL: ${SCOUT_STAGE_URL}
STAGING_LOGDIR: ${STAGING_LOGDIR}
REPORT_EXPIREDAYS: ${REPORT_EXPIREDAYS}
FILE_RESTAGE_INTERVAL: ${FILE_RESTAGE_INTERVAL}
JOB_EXPIRY_TIME: ${JOB_EXPIRY_TIME}
DBUSER: ${DBUSER}
DBPASSWORD: ${DBPASSWORD}
DBHOST: ${DBHOST}
DBNAME: ${DBNAME}
volumes:
- ./staging:/usr/src/app
- /var/log/staging:/var/log/staging
haproxy:
build:
dockerfile: Dockerfile
context: ./haproxy
restart: always
ports:
- '8080:8080'
volumes:
- ./config:/etc/pawsey-tls/latest/haproxy/
volumes:
pgdata: