-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
167 lines (157 loc) · 3.63 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
version: "3"
services:
bumblebee:
build: .
image: bumblebee
stdin_open: true
tty: true
ports:
- 8080:8080
environment: &bb_env
DEBUG: "True"
DB_HOST: mariadb
DB_USER: root
DB_PASSWORD: toor
REDIS_HOST: redis
env_file:
- .env
volumes:
- .:/app
restart: unless-stopped
command: django-admin runserver 0.0.0.0:8080
depends_on:
init:
condition: service_completed_successfully
mariadb:
condition: service_healthy
redis:
condition: service_healthy
keycloak:
condition: service_healthy
links:
- mariadb:mariadb
- redis:redis
- keycloak:keycloak
init:
build: .
links:
- mariadb:mariadb
- redis:redis
environment:
<<: *bb_env
DJANGO_MIGRATE: "True"
volumes:
- .:/app
depends_on:
mariadb:
condition: service_healthy
restart: on-failure
command: /docker-setup.sh
rqscheduler:
build: .
environment: *bb_env
env_file:
- .env
restart: on-failure
command: django-admin rqscheduler -i5
depends_on:
init:
condition: service_completed_successfully
mariadb:
condition: service_healthy
redis:
condition: service_healthy
links:
- mariadb:mariadb
- redis:redis
volumes:
- .:/app
rqworker:
build: .
links:
- mariadb:mariadb
- redis:redis
environment: *bb_env
env_file:
- .env
restart: on-failure
command: django-admin rqworker
depends_on:
init:
condition: service_completed_successfully
mariadb:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- .:/app
mariadb:
image: mariadb:11.3.2
environment:
MARIADB_ROOT_PASSWORD: toor
ports:
- 3306:3306
volumes:
- ./docker-init/mariadb_data:/var/lib/mysql
- ./docker-init/mariadb:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD", "mariadb-admin", "-uroot", "-ptoor", "ping", "--silent"]
redis:
image: redis:alpine
ports:
- 6379:6379
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
guacd:
image: guacamole/guacd:1.5.0
restart: unless-stopped
ports:
- 4822:4822
guacamole:
image: guacamole/guacamole:1.5.0
restart: unless-stopped
environment:
GUACD_HOSTNAME: guacd
# Guacamole has to share the database with Bumblebee.
MYSQL_HOSTNAME: mariadb
MYSQL_DATABASE: bumblebee
MYSQL_USER: root
MYSQL_PASSWORD: toor
env_file:
- .env
ports:
- 9000:8080
depends_on:
guacd:
condition: service_started
mariadb:
condition: service_healthy
keycloak:
condition: service_healthy
keycloak:
image: quay.io/keycloak/keycloak:24.0
environment:
KC_DB: mariadb
KC_DB_URL: jdbc:mariadb://mariadb/keycloak
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: keycloak
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KC_HOSTNAME_STRICT_HTTPS: 'false'
KC_PROXY: edge
ports:
- 8090:8090
volumes:
- ./docker-init/keycloak:/opt/keycloak/data/import
depends_on:
mariadb:
condition: service_healthy
command: start-dev --import-realm --http-port=8090 --http-enabled true --health-enabled true
restart: on-failure
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/8090;echo -e \"GET /health/ready HTTP/1.1\r\nhost: http://localhost\r\nConnection: close\r\n\r\n\" >&3;grep \"HTTP/1.1 200 OK\" <&3"]
volumes:
mariadb_data:
redis_data: