-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
173 lines (164 loc) · 4.26 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
services:
tom:
image: registry.nersc.gov/m1727/raknop/tom_desc_bindmount
build:
context: ./
dockerfile: docker_server/Dockerfile
target: tom-server-bindmount
ports:
- "8080:8080"
depends_on:
migratedb:
condition: service_completed_successfully
volumes:
- type: bind
source: ./tom_desc
target: /tom_desc
- type: bind
source: ./secrets
target: /secrets
environment:
- DB_USER=postgres
- DB_PASS=fragile
- DB_HOST=postgres
- DB_PORT=5432
- DB_NAME=tom_desc
# - CASSANDRA_HOST=cassandra
# - CASSANDRA_USER=cassandra
# - CASSANDRA_PASSWORD=cassandra
user: ${USERID:-0}:${GROUPID:-0}
shell:
image: registry.nersc.gov/m1727/raknop/tom_desc_bindmount_dev
build:
context: ./
dockerfile: docker_server/Dockerfile
target: tom-server-bindmount-dev
depends_on:
migratedb:
condition: service_completed_successfully
volumes:
- type: bind
source: ./tom_desc
target: /tom_desc
- type: bind
source: ./secrets
target: /secrets
environment:
- DB_USER=postgres
- DB_PASS=fragile
- DB_HOST=postgres
- DB_PORT=5432
- DB_NAME=tom_desc
# - CASSANDRA_HOST=cassandra
# - CASSANDRA_USER=cassandra
# - CASSANDRA_PASSWORD=cassandra
user: ${USERID:-0}:${GROUPID:-0}
entrypoint: [ "tail", "-f", "/etc/issue" ]
migratedb:
image: registry.nersc.gov/m1727/raknop/tom_desc_bindmount
build:
context: ./
dockerfile: docker_server/Dockerfile
target: tom-server-bindmount
depends_on:
postgres:
condition: service_healthy
# cassandra:
# condition: service_healthy
volumes:
- type: bind
source: ./tom_desc
target: /tom_desc
- type: bind
source: ./secrets
target: /secrets
environment:
- DB_USER=postgres
- DB_PASS=fragile
- DB_HOST=postgres
- DB_PORT=5432
- DB_NAME=tom_desc
# - CASSANDRA_HOST=cassandra
# - CASSANDRA_USER=cassandra
# - CASSANDRA_PASSWORD=cassandra
entrypoint:
- /bin/bash
- -c
- |
python manage.py migrate
# python manage.py sync_cassandra
postgres:
image: registry.nersc.gov/m1727/raknop/tom-postgres
build:
context: ./docker_postgres
dockerfile: Dockerfile
target: tom-postgres
volumes:
- tomdbdata:/var/lib/postgresql/data
healthcheck:
test: netcat -w 1 localhost 5432 || exit 1
interval: 5s
timeout: 10s
retries: 5
# cassandra:
# image: registry.nersc.gov/m1727/raknop/tom_cassandra
# build:
# context: ./docker_cassandra
# dockerfile: Dockerfile
# volumes:
# - tomcassandradata:/var/lib/cassandra
# healthcheck:
# test: cqlsh -u cassandra -p cassandra cassandra < /dev/null
# interval: 10s
# timeout: 2s
# retries: 10
kafka-zookeeper:
image: registry.nersc.gov/m1727/raknop/kafka
build:
context: docker_kafka
healthcheck:
test: netcat -w 1 localhost 2181 || exit 1
interval: 5s
timeout: 10s
retries: 5
entrypoint: [ "bin/zookeeper-server-start.sh", "config/zookeeper.properties" ]
kafka-server:
depends_on:
kafka-zookeeper:
condition: service_healthy
image: registry.nersc.gov/m1727/raknop/kafka
build:
context: docker_kafka
healthcheck:
test: netcat -w 1 localhost 9092 || exit 1
interval: 5s
timeout: 10s
retries: 5
entrypoint: [ "bin/kafka-server-start.sh", "config/server.properties" ]
fakebroker:
depends_on:
kafka-server:
condition: service_healthy
image: registry.nersc.gov/m1727/raknop/fakebroker
build:
context: tests
dockerfile: Dockerfile.fakebroker
entrypoint:
- python
- /fake/fakebroker.py
- --source
- kafka-server:9092
- -t
- tmp-alerts-wfd
- tmp-alerts-ddf-full
- --dest
- kafka-server:9092
- -u
- classifications
- -b
- /fake/schema/elasticc.v0_9_1.brokerClassification.avsc
- -s
- /fake/schema/elasticc.v0_9_1.alert.avsc
volumes:
tomdbdata:
# tomcassandradata: