-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·120 lines (103 loc) · 2.89 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
version: '2'
services:
### Workspace Utilities Container ###
# 构建工作环境配置
workspace:
build:
context: ./workspace
args:
- TZ=Asia/Shanghai #CST
- INSTALL_WORKSPACE_SSH=true
- PUID=1000
- PGID=1000
- USER=work
- GROUP=work
- USER_PWD=work
- INSTALL_COMPOSER=true
volumes:
- ./www:/var/www
ports:
- "2222:22"
privileged: true
tty: true #bash shell
### PHP-FPM Container #######################################
php-fpm:
build:
context: ./php-fpm
args:
- TZ=Asia/Shanghai #CST
- PUID=1000
- PGID=1000
- USER=work
- GROUP=work
- INSTALL_XDEBUG=false
- INSTALL_PHPREDIS=true
- INSTALL_MONGO=false
- INSTALL_OPCACHE=true
- INSTALL_AMQP=true
dockerfile: Dockerfile
volumes_from:
- workspace
expose:
- "9000"
links:
- workspace
# extra_hosts:
# # IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
# - "dockerhost:10.0.75.1"
restart: always
### Nginx Server Container ##################################
nginx:
build:
context: ./nginx
args:
- TZ=Asia/Shanghai #CST
- PUID=1000
- PGID=1000
- USER=work
- GROUP=work
volumes_from:
- workspace
volumes:
- ./logs/nginx/:/var/log/nginx
- ./nginx/conf.d/:/etc/nginx/conf.d
ports:
- "8000:80"
- "8430:443"
links:
- php-fpm
restart: always
### mysql Container ##################################
mysql:
build:
context: ./mysql
args:
- MYSQL_DATABASE=work
- MYSQL_USER=work
- MYSQL_PASSWORD=work@123!
- MYSQL_ROOT_PASSWORD=root
volumes:
- mysql-data:/var/lib/mysql
ports:
- "3306:3306"
#### Redis Container #########################################
redis:
build: ./redis
volumes:
- redis:/data
ports:
- "6379:6379"
# ### RabbitMQ Container ######################################
rabbitmq:
build: ./rabbitmq
ports:
- "5672:5672"
- "15671:15671"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: work
RABBITMQ_DEFAULT_PASS: work
#### Volumes ###########################################
volumes:
mysql-data:
redis: