-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yaml
80 lines (74 loc) · 1.51 KB
/
docker-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
version: '3'
networks:
web-network:
services:
docker-ent:
image: chudaozhe/ent:1.1-test
hostname: ent
restart: always
tty: true
volumes:
- ./www/ent/data:/data/data
- ./www/ent/logs:/data/logs
networks:
- web-network
depends_on:
docker-mysql:
condition: service_healthy
docker-redis:
condition: service_healthy
docker-nginx:
image: nginx:1.21.3
ports:
- "80:80"
- "443:443"
- "25:25"
- "465:465"
tty: true
volumes:
- ./www:/var/www
- ./etc/nginx:/etc/nginx/conf.d
- nginx-log:/var/log/nginx
networks:
- web-network
depends_on:
- docker-ent
docker-redis:
image: redis:6.2.5
restart: always
tty: true
command: redis-server /etc/redis.conf
volumes:
- ./etc/redis.conf:/etc/redis.conf
- redis-data:/data
ports:
- "6379:6379"
networks:
- web-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 3
docker-mysql:
image: mariadb:10.5.12
restart: always
tty: true
volumes:
- ./etc/my.cnf:/etc/my.cnf
- db-data:/var/lib/mysql
environment:
- "MYSQL_ALLOW_EMPTY_PASSWORD=yes"
ports:
- "3306:3306"
networks:
- web-network
healthcheck:
test: mysql ent --user=root --password= --silent --execute "SELECT 1;"
interval: 1s
timeout: 3s
retries: 3
volumes:
db-data:
redis-data:
nginx-log: