-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
100 lines (99 loc) · 2.1 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
---
version: "3.7"
services:
nginx:
build:
context: ./nginx
args:
CUSTOMIZE_MIRROR:
container_name: nginx
ports:
- "${NGINX_HTTP_PORT}:80"
- "${NGINX_HTTPS_PORT}:443"
restart: always
volumes:
- webroot:/wwwroot
- ./nginx/configs/:/etc/nginx/configs/:ro
- ./nginx/sites/:/etc/nginx/sites/:ro
- ./nginx/logs/:/var/log/nginx/:rw
- ./nginx/nginx.conf/:/etc/nginx/nginx.conf
extra_hosts:
- ${PHP_FPM_EXTRA_HOSTS}
networks:
- webnet
environment:
TZ: ${TZ}
php7:
build:
context: ./php7
args:
CUSTOMIZE_MIRROR:
PHP_COMPOSER:
PHP_EXT_GD:
PHP_EXT_ZIP:
PHP_EXT_MYSQL:
PHP_EXT_MONGODB:
PHP_EXT_SWOOLE:
PHP_EXT_HPROSE:
PHP_EXT_REDIS:
container_name: php7
restart: always
volumes:
- webroot:/wwwroot:rw
- ./php7/logs:/var/log/php:rw
- ./php7/conf/php.ini:/usr/local/etc/php/php.ini
- ./php7/cron.d:/etc/cron.d
- ./php7/supervisor.d:/etc/supervisor/conf.d
extra_hosts:
- ${PHP_FPM_EXTRA_HOSTS}
networks:
- webnet
environment:
TZ: ${TZ}
mysql:
build:
context: ./mysql
ports:
- "${MYSQL_PORT}:3306"
container_name: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PWD}
SET_CONTAINER_TIMEZONE: "TRUE"
CONTAINER_TIMEZONE: "Asia/Shanghai"
networks:
- webnet
volumes:
- ./mysql/conf/my.cnf:/etc/mysql/my.cnf:ro
- database:/var/lib/mysql/:rw
- ./mysql/logs/:/var/log/mysql/:rw
redis:
image: redis:latest
container_name: redis
restart: always
networks:
- webnet
ports:
- "${REDIS_PORT}:6379"
nodejs:
build:
context: ./nodejs
args:
CUSTOMIZE_MIRROR:
NODE_GULP:
container_name: nodejs
restart: always
volumes:
- webroot:/app
networks:
webnet:
volumes:
webroot:
driver: local
driver_opts:
type: none
device: ${WEB_ROOT}
o: bind
database:
external:
name: database_mysql