-
Notifications
You must be signed in to change notification settings - Fork 8
/
orchestrator-compose.yaml
143 lines (133 loc) · 3.47 KB
/
orchestrator-compose.yaml
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
version: '3'
volumes:
database:
labels:
com.screaming_bunny.container: 'MariaDB'
com.screaming_bunny.description: 'Persistent MariaDB Volume'
etcd:
labels:
com.screaming_bunny.container: 'Etcd'
com.screaming_bunny.description: 'Persistent Etcd Volume'
queue:
labels:
com.screaming_bunny.container: 'RabbitMQ'
com.screaming_bunny.description: 'Persistent RabbitMQ Volume'
services:
producer-core:
hostname: producer-core
image: screambunn/orchestrator_producer-core
build:
context: ./orchestrator/producer-core
dockerfile: Dockerfile
env_file:
- ./environment/database.connect.env
- ./environment/queue.connect.env
- ./environment/etcd.connect.env
- ./environment/security.env
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080']
interval: 30s
timeout: 10s
retries: 5
external_links:
- database
- etcd
- queue
depends_on:
- database
- etcd
- queue
restart: on-failure
gui:
hostname: gui
image: screambunn/orchestrator_gui
build:
context: ./orchestrator/gui
dockerfile: Dockerfile
environment:
PRODUCER_HOST: producer-core
PRODUCER_PORT: 8080
ports:
- "8080:80"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080']
interval: 30s
timeout: 10s
retries: 5
external_links:
- producer-core
depends_on:
- database
- producer-core
restart: on-failure
transport-producer-https:
hostname: transport-producer-https
image: screambunn/orchestrator_transport_https
build:
context: ./orchestrator/transport/https
dockerfile: Dockerfile
env_file:
- ./environment/queue.connect.env
- ./environment/etcd.connect.env
- ./environment/security.env
external_links:
- etcd
- queue
depends_on:
- etcd
- queue
restart: on-failure
transport-producer-mqtt:
hostname: transport-producer-mqtt
image: screambunn/orchestrator_transport_mqtt
build:
context: ./orchestrator/transport/mqtt
dockerfile: Dockerfile
env_file:
- ./environment/queue.connect.env
- ./environment/etcd.connect.env
- ./environment/mqtt_transport.env
- ./environment/security.env
external_links:
- etcd
- queue
depends_on:
- etcd
- queue
restart: on-failure
queue:
hostname: rabbit
image: rabbitmq:management-alpine
volumes:
- queue:/var/lib/rabbitmq
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:15672']
interval: 30s
timeout: 10s
retries: 5
restart: on-failure
database:
hostname: database
image: mariadb
ports:
- "3306:3306"
env_file:
- ./environment/database.connect.env
volumes:
- database:/var/lib/mysql
healthcheck:
test: ['CMD', '/usr/bin/mysql/install/bin/mysql', '--protocol=tcp', '-h', 'mysql', '-u', 'root', '-p$DATABASE_ROOT_USER_PASSWORD', '-e', '"show databases;"', '||', 'exit 1']
interval: 30s
timeout: 10s
retries: 3
restart: on-failure
etcd:
hostname: etcd
image: quay.io/coreos/etcd:v3.3.25
environment:
ALLOW_NONE_AUTHENTICATION: 'yes'
ETCD_DATA_DIR: '/data/etcd'
volumes:
- etcd:/data/etcd
command: sh -c 'etcd -listen-client-urls http://0.0.0.0:2379 -advertise-client-urls http://etcd:2379'
restart: on-failure