-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
113 lines (112 loc) · 3.31 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
version: "3"
services:
# ===================================================================== s1 nginx
s1:
build:
context: ./services/nginx
args:
NGINX_VERSION: ${NGINX_VERSION}
CONTAINER_PACKAGE_URL: ${CONTAINER_PACKAGE_URL}
NGINX_INSTALL_APPS: ${NGINX_INSTALL_APPS}
container_name: c1
ports:
- "${NGINX_HTTP_HOST_PORT}:80"
- "${NGINX_HTTPS_HOST_PORT}:443"
volumes:
- "hunan:/changsha"
- ${NGINX_CONF_DIR}:/etc/nginx/sites:ro
- ${NGINX_CONF_FILE}:/etc/nginx/nginx.conf:ro
- ${NGINX_FASTCGI_PHP_CONF}:/etc/nginx/fastcgi-php.conf:ro
- ${NGINX_FASTCGI_PARAMS}:/etc/nginx/fastcgi_params:ro
- ${NGINX_LOG_DIR}:/var/log/nginx/:rw
- ${NGINX_SSL_CERTIFICATE_DIR}:/ssl:rw
- ${WWW_DIR}:/www:rw
- ${ROOT_DIR}:/tutorials:rw
- ../0000_laravel:/0000
- ../0001_vue:/0001:rw
environment:
TZ: "$TZ"
restart: always
networks:
- youshengyouse
# ===================================================================== s2 php
s2:
build:
context: ./services/php
args:
PHP_VERSION: php:${PHP_VERSION}-fpm-alpine
CONTAINER_PACKAGE_URL: ${CONTAINER_PACKAGE_URL}
PHP_EXTENSIONS: ${PHP_EXTENSIONS}
TZ: "$TZ"
container_name: c2
volumes:
- ${WWW_DIR}:/www:rw
- ${PHP_SOCKET_DIR}:/var/run:rw
- ${PHP_PHP_CONF_FILE}:/usr/local/etc/php/php.ini:ro
- ${PHP_FPM_CONF_ZZ_FILE}:/usr/local/etc/php-fpm.d/zz-docker.conf:ro
- ${PHP_FPM_CONF_FILE}:/usr/local/etc/php-fpm.d/www.conf:rw
- ${PHP_LOG_DIR}:/var/log/php
- ${DATA_DIR}/composer:/tmp/composer
- ${ROOT_DIR}:/tutorials:rw
- ../0000_laravel:/0000
- ../0001_vue:/0001
- "hunan:/changsha"
restart: always
ports:
- "8000:8000"
- "8001:8001"
#environment:
# APP_BASE_PATH: /0000/cheshi
cap_add:
- SYS_PTRACE
networks:
- youshengyouse
# ===================================================================== s3 mysql
s3:
image: mysql:${MYSQL5_VERSION}
container_name: c3
ports:
- "${MYSQL5_HOST_PORT}:3306"
volumes:
- ${MYSQL5_CONF_FILE}:/etc/mysql/conf.d/mysql.cnf:ro
- ${DATA_DIR}/mysql5:/var/lib/mysql/:rw
restart: always
networks:
- youshengyouse
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL5_ROOT_PASSWORD}"
TZ: "$TZ"
# ===================================================================== s4 phpmyadmin
s4:
image: phpmyadmin/phpmyadmin:latest
container_name: c4
ports:
- "${PHPMYADMIN_HOST_PORT}:80"
volumes:
- ${PHPMYADMIN_USER_CONF_FILE}:/etc/phpmyadmin/config.user.inc.php:ro
- ${PHPMYADMIN_PHP_CONF_FILE}:/usr/local/etc/php/conf.d/php-phpmyadmin.ini:ro
networks:
- youshengyouse
environment:
- PMA_HOST=s3
- PMA_PORT=3306
- TZ=$TZ
# ===================================================================== s5 redis
s5:
image: redis:${REDIS_VERSION}
container_name: c5
ports:
- "${REDIS_HOST_PORT}:6379"
volumes:
- ${REDIS_CONF_FILE}:/etc/redis.conf:ro
- ${DATA_DIR}/redis:/data/:rw
restart: always
entrypoint: ["redis-server", "/etc/redis.conf"]
environment:
TZ: "$TZ"
networks:
- youshengyouse
networks:
youshengyouse:
volumes:
hunan: