-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
197 lines (186 loc) · 5.36 KB
/
docker-compose.yaml
File metadata and controls
197 lines (186 loc) · 5.36 KB
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
name: impact-analysis
services:
nats:
image: nats:alpine
container_name: nats
platform: linux/amd64
command: '--cluster_name NATS --cluster nats://0.0.0.0:6222 --http_port 8222'
networks: ['impact-analysis']
healthcheck:
test: wget http://localhost:8222/healthz -q -S -O - || exit 1
interval: 30s
timeout: 5s
retries: 5
nats-1:
image: nats:alpine
container_name: nats-1
platform: linux/amd64
command: '--cluster_name NATS --cluster nats://0.0.0.0:6222 --routes=nats://ruser:T0pS3cr3t@nats:6222 --http_port 8222'
networks: ['impact-analysis']
depends_on: ['nats']
healthcheck:
test: wget http://localhost:8222/healthz -q -S -O - || exit 1
interval: 30s
timeout: 5s
retries: 5
nats-2:
image: nats:alpine
container_name: nats-2
platform: linux/amd64
command: '--cluster_name NATS --cluster nats://0.0.0.0:6222 --routes=nats://ruser:T0pS3cr3t@nats:6222 --http_port 8222'
networks: ['impact-analysis']
depends_on: ['nats']
healthcheck:
test: wget http://localhost:8222/healthz -q -S -O - || exit 1
interval: 30s
timeout: 5s
retries: 5
postgres:
image: postgres:14-alpine # timescale/timescaledb:latest-pg14
container_name: ${POSTGRES_HOST}
platform: linux/amd64
ports:
- ${POSTGRES_PORT}:5432
volumes:
- ./schema.sql:/docker-entrypoint-initdb.d/schema.sql
- db_data_volume:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
networks: ['impact-analysis']
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
interval: 30s
timeout: 5s
retries: 5
neo4j:
image: neo4j:5.26
container_name: neo4j
platform: linux/amd64
ports:
- '7474:7474'
- '7687:7687'
environment:
NEO4J_AUTH: '${NEO4J_AUTH}'
NEO4J_PLUGINS: '["apoc", "apoc-extended"]'
NEO4J_apoc_export_file_enabled: 'true'
NEO4J_apoc_import_file_enabled: 'true'
NEO4J_apoc_import_file_use__neo4j__config: 'true'
NEO4J_dbms_security_procedures_unrestricted: 'apoc.*'
volumes:
- neo4j_data:/data
- neo4j_logs:/logs
- neo4j_import:/import
- neo4j_plugins:/plugins
watchtower:
image: containrrr/watchtower
container_name: watchtower
platform: linux/amd64
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./docker-conf/config.json:/config.json
command: ['--interval', '7200', '--cleanup', '--label-enable']
deploy:
replicas: ${ENABLE_WATCHTOWER}
core:
pull_policy: always
image: ${CORE_IMAGE}:${CORE_TAG}
networks: ['impact-analysis']
depends_on: ['nats', 'postgres']
restart: always
container_name: ${CORE_CONTAINER_NAME}
platform: linux/amd64
labels:
- 'com.centurylinklabs.watchtower.enable=true'
ports:
- '${CORE_PORT}:8080'
- '9092:9092'
env_file:
- ${ENV_FILE}
volumes:
- ${CORE_VOLUME}
healthcheck:
test: wget http://localhost:8080/healthz -q -S -O - || exit 1
interval: 30s
timeout: 5s
retries: 5
prediction-service:
pull_policy: always
image: ${PREDICTION_IMAGE}:${PREDICTION_TAG}
networks: ['impact-analysis']
depends_on: ['nats', 'postgres']
container_name: ${PREDICTION_CONTAINER_NAME}
platform: linux/amd64
labels:
- 'com.centurylinklabs.watchtower.enable=true'
restart: always
ports:
- '${PREDICTION_PORT}:8282'
env_file:
- ${ENV_FILE}
volumes:
- ${PREDICTION_APP_VOLUME}
- models_volume:${MODELS_VOLUME:-/models}
dashboard:
pull_policy: always
image: ${DASHBOARD_IMAGE}:${DASHBOARD_TAG}
container_name: dashboard
platform: linux/amd64
labels:
- 'com.centurylinklabs.watchtower.enable=true'
volumes:
- ./runtime-config.js:/usr/share/nginx/html/runtime-config.js
networks: ['impact-analysis']
restart: always
depends_on: ['core']
ports:
- 3000:8080
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080/nginx_status']
interval: 30s
timeout: 5s
retries: 5
miner-api:
pull_policy: always
user: ${MY_UID}:${MY_GID}
container_name: ${MINER_API_CONTAINER_NAME}
platform: linux/amd64
labels:
- 'com.centurylinklabs.watchtower.enable=true'
image: ${MINER_API_IMAGE}:${MINER_API_TAG}
env_file:
- ${ENV_FILE}
ports:
- '${MINER_API_PORT}:8181'
networks: ['impact-analysis']
depends_on: ['core', 'neo4j']
volumes:
- ${USER_VOLUME}:${REPOSITORY_VOLUME}
miner-scheduler:
pull_policy: always
user: ${MY_UID}:${MY_GID}
container_name: ${MINER_SCHEDULER_CONTAINER_NAME}
platform: linux/amd64
labels:
- 'com.centurylinklabs.watchtower.enable=true'
image: ${MINER_SCHEDULER_IMAGE}:${MINER_SCHEDULER_TAG}
env_file:
- ${ENV_FILE}
networks: ['impact-analysis']
depends_on: ['core', 'neo4j']
volumes:
- ${USER_VOLUME}:${REPOSITORY_VOLUME}
- ./.miner.gitconfig:/root/.gitconfig
networks:
impact-analysis:
name: impact-analysis
volumes:
db_data_volume: {}
models_volume: {}
# orient_data_volume: {}
neo4j_data: {}
neo4j_logs: {}
neo4j_import: {}
neo4j_plugins: {}