-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
91 lines (86 loc) · 1.95 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
version: '3'
services:
node:
build: ./node/
expose:
- "6001"
volumes:
- ${WORKSPACES}:/var/www/html/:rw,cached
links:
- redis:redis
extra_hosts:
- "local.zz.com:${NGINX_IP}"
environment:
TZ: Asia/Shanghai
networks:
docker_net:
ipv4_address: ${NODE_IP}
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ${WORKSPACES}:/var/www/html/:rw,cached
- ./conf/nginx/conf.d:/etc/nginx/conf.d/:ro,cached
- ./conf/nginx/nginx.conf:/etc/nginx/nginx.conf:ro,cached
- ./log/nginx/:/var/log/nginx/:rw,cached
links:
- php:fpm
environment:
TZ: Asia/Shanghai
networks:
docker_net:
ipv4_address: ${NGINX_IP}
php:
build: ./php/
expose:
- "9000"
volumes:
- ${WORKSPACES}:/var/www/html/:rw,cached
- ./conf/php/php.ini:/usr/local/etc/php/php.ini:ro,cached
- ./conf/php/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf:rw,cached
- ./log/php-fpm/:/var/log/php-fpm/:rw,cached
links:
- mysql:mysql
- redis:redis
environment:
TZ: Asia/Shanghai
networks:
docker_net:
ipv4_address: ${PHP_IP}
mysql:
image: mysql:5.7
ports:
- "3306:3306"
volumes:
- ./conf/mysql/my.cnf:/etc/mysql/my.cnf:ro,cached
- ./mysql/data:/var/lib/mysql/:rw,cached
- ./log/mysql/:/var/log/mysql/:rw,cached
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: "123456"
networks:
docker_net:
ipv4_address: ${MYSQL_IP}
redis:
image: redis:latest
ports:
- "6379:6379"
volumes:
- ./redis:/data
environment:
TZ: Asia/Shanghai
command:
redis-server --requirepass scztskj
networks:
docker_net:
ipv4_address: ${REDIS_IP}
networks:
docker_net:
driver: bridge
ipam:
driver: default
config:
-
subnet: "${DOCKER_SUBNET}"