forked from KubeOperator/KubeOperator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
97 lines (92 loc) · 2.04 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
version: "2.2"
services:
nginx:
image: nginx:alpine
container_name: kubeops_nginx
restart: always
ports:
- 80:80
volumes:
- ./docker/nginx/f2o.conf:/etc/nginx/conf.d/default.conf
healthcheck:
test: ["CMD", "test", "-f", "/var/run/nginx.pid"]
interval: 10s
timeout: 5s
retries: 10
ui:
build: ui
image: kube-operator/ui:2.1.0
container_name: kubeops_ui
restart: always
healthcheck:
test: ["CMD", "test", "-f", "/var/run/nginx.pid"]
interval: 10s
timeout: 5s
retries: 10
depends_on:
api:
condition: service_healthy
api:
build: api
image: kube-operator/api:2.1.0
container_name: kubeops_api
restart: always
privileged: true
tty: true
dns:
- "127.0.0.1"
volumes:
- api_data:/opt/kubeOperator-api/data
- dns_data:/etc/dnsmasq.d
- ./data:/data
- /var/run/docker.sock:/var/run/docker.sock
environment:
DB_HOST: mysql
DB_USER: root
DB_PASSWORD: SuMk2lH20ocmvyu1p38m40
DB_NAME: kube-operator
REDIS_HOST: redis
healthcheck:
test: "curl localhost:8000"
interval: 10s
timeout: 5s
retries: 20
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
mysql:
container_name: kubeops_mysql
image: mysql:5
command: --character-set-server=utf8
ports:
- 3306
volumes:
- mysql_data:/var/lib/mysql
environment:
MYSQL_DATABASE: kube-operator
MYSQL_ROOT_PASSWORD: SuMk2lH20ocmvyu1p38m40
healthcheck:
test: "mysql -uroot -h127.0.0.1 -pSuMk2lH20ocmvyu1p38m40 -e 'SHOW DATABASES;'"
interval: 10s
timeout: 5s
retries: 10
redis:
image: redis:alpine
container_name: kubeops_redis
restart: always
ports:
- 6379
healthcheck:
test: ["CMD", "redis-cli", "info"]
interval: 10s
timeout: 5s
retries: 10
volumes:
api_data:
mysql_data:
redis_data:
dns_data:
networks:
default: