-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
128 lines (128 loc) · 3.21 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
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_STAGE_URL: ${SCOUT_STAGE_URL}
RESULT_USERNAME: ${RESULT_USERNAME}
RESULT_PASSWORD: ${RESULT_PASSWORD}
KAFKA_TOPIC: ${KAFKA_TOPIC}
DBUSER: ${DBUSER}
DBPASSWORD: ${DBPASSWORD}
DBHOST: ${DBHOST}
DBNAME: ${DBNAME}
volumes:
- ./staging:/usr/src/app
- /var/log
db:
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
pgadmin:
image: dpage/pgadmin4
restart: always
depends_on:
db:
condition: service_healthy
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: root
volumes:
- pgadmin:/var/lib/pgadmin
nginx:
build:
dockerfile: Dockerfile.dev
context: ./nginx
ports:
- '8000:8000'
- '5050:5050'
- '9092:9092'
depends_on:
- "api"
zookeeper:
image: zookeeper:3.7.0
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
expose:
- '9093'
depends_on:
- "zookeeper"
environment:
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_LISTENERS: INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
healthcheck:
test: ["CMD", "nc", "-vz", "localhost", "9092"]
interval: 30s
timeout: 10s
retries: 4
kafkad:
build:
dockerfile: Dockerfile
context: ./staging
command: pipenv run python -u kafkad.py
tty: true
depends_on:
db:
condition: service_healthy
kafka:
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}
DBUSER: ${DBUSER}
DBPASSWORD: ${DBPASSWORD}
DBHOST: ${DBHOST}
DBNAME: ${DBNAME}
volumes:
- ./staging:/usr/src/app
- /var/log
haproxy:
build:
dockerfile: Dockerfile.dev
context: ./haproxy
restart: always
ports:
- '8081:8081'
volumes:
- ./config:/etc/pawsey-tls/latest/haproxy/
volumes:
pgdata:
pgadmin: