-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
89 lines (89 loc) · 2.05 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
version: '3.7'
services:
mysql:
image: "mysql:8.0"
environment:
TZ: "Asia/Shanghai"
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
MYSQL_ROOT_HOST: "%"
networks:
- net
volumes:
- ./.docker/mysql:/var/lib/mysql
- ./.github/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "13306:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
retries: 3
timeout: 5s
restart: "always"
redis:
image: "redis:alpine"
command:
- "redis-server"
- "--databases 256"
ports:
- "61379:6379"
networks:
- net
volumes:
- ./.docker/redis:/data
- ./.docker/redis/redis.conf:/usr/local/etc/redis/redis.conf
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
retries: 3
timeout: 5s
restart: "always"
shabao-admin:
image: "wlfpanda1012/hyperf:8.1-alpine-v3.18-swoole-xlswriter"
restart: always
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
rabbitmq:
condition: service_healthy
environment:
APP_ENV: "${APP_ENV:-prod}"
DB_HOST: "mysql"
REDIS_HOST: "redis"
working_dir: "/opt/www"
ports:
- "9505:9505"
- "9506:9506"
volumes:
- "./:/opt/www"
- "./.env.docker:/opt/www/.env"
networks:
- net
entrypoint: ["php", "watch", "-c"]
rabbitmq:
image: wlfpanda1012/rabbitmq:rabbitmq_delayed_message_exchange-3.13.0
restart: always
networks:
- net
ports:
- "5369:4369"
- "6672:5672"
- "25672:15672"
- "35672:25672"
environment:
- RABBITMQ_DEFAULT_USER=shabaoadmin
- RABBITMQ_DEFAULT_PASS=12345678
volumes:
- ./.docker/rabbitmq:/var/lib/rabbitmq
- ./.docker/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 10s
timeout: 5s
retries: 5
networks:
net:
driver: bridge
volumes:
mysql-data:
redis-data: