-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
84 lines (82 loc) · 1.74 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
version: '3.5'
volumes:
mysql:
driver: ${VOLUMES_DRIVER}
redis:
driver: ${VOLUMES_DRIVER}
services:
php-cli:
build:
context: ./php-cli
args:
- CLI_VERSION=${CLI_VERSION}
- CHANGE_SOURCE=${CHANGE_SOURCE}
environment:
- TZ=${TIMEZONE}
volumes:
- ${CODE_PATH_HOST}:/var/www/
depends_on:
- mysql
- redis
tty: true
restart: on-failure
php-fpm:
build:
context: ./php-fpm
args:
- FPM_VERSION=${FPM_VERSION}
- CHANGE_SOURCE=${CHANGE_SOURCE}
environment:
- TZ=${TIMEZONE}
volumes:
- ${CODE_PATH_HOST}:/var/www/
expose:
- "9000"
depends_on:
- mysql
- redis
restart: on-failure
mysql:
build:
context: ./mysql
args:
- MYSQL_VERSION=${MYSQL_VERSION}
volumes:
- ${DATA_PATH_HOST}/mysql:/var/lib/mysql
ports:
- "${MYSQL_PORT}:3306"
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- TZ=${TIMEZONE}
restart: on-failure
redis:
build:
context: ./redis
args:
- REDIS_VERSION=${REDIS_VERSION}
volumes:
- ${DATA_PATH_HOST}/redis:/data
environment:
- TZ=${TIMEZONE}
ports:
- "${REDIS_PORT}:6379"
restart: on-failure
nginx:
build:
context: ./nginx
args:
- NGINX_VERSION=${NGINX_VERSION}
environment:
- TZ=${TIMEZONE}
volumes:
- ${CODE_PATH_HOST}:/var/www/
- ${NGINX_SSL_PATH}:/etc/nginx/ssl
ports:
- "${NGINX_HTTP_PORT}:80"
- "${NGINX_HTTPS_PORT}:443"
depends_on:
- php-fpm
restart: on-failure