-
Notifications
You must be signed in to change notification settings - Fork 19
/
docker-compose.yml
94 lines (83 loc) · 2.57 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
version: '3'
services:
### Nginx container #########################################
nginx:
image: nginx:alpine
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
volumes:
- ${PROJECT_FOLDER}:/etc/nginx/html/:rw
- ./work/components/nginx/config/nginx.conf:/etc/nginx/nginx.conf:ro
- ./work/components/nginx/config/conf.d:/etc/nginx/conf.d:ro
- ./work/components/nginx/log:/var/log/nginx:rw
restart: always
privileged: true
networks:
- net-php
### PHP container #########################################
php:
build:
context: ./build/php
args:
TIME_ZONE: ${GLOBAL_TIME_ZONE}
CHANGE_SOURCE: ${GLOBAL_CHANGE_SOURCE}
volumes:
- ${PROJECT_FOLDER}:/etc/nginx/html:rw
- ./work/components/php/config/php.ini:/usr/local/etc/php/php.ini:ro
- ./work/components/php/config/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./work/components/php/log:/var/log:rw
restart: always
privileged: true
networks:
- net-php
- net-mysql
- net-redis
### Mysql container #########################################
mysql:
image: mysql:5.7
ports:
- "${MYSQL_PORT}:3306"
volumes:
- ./work/components/mysql/data:/var/lib/mysql:rw
- ./work/components/mysql/config/mysql.cnf:/etc/mysql/conf.d/mysql.cnf:ro
- ./work/components/mysql/log:/var/log/mysql:rw
restart: always
privileged: true
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
networks:
- net-mysql
### Redis container #########################################
redis:
image: redis:latest
ports:
- "${REDIS_PORT}:6379"
volumes:
- ./work/components/redis/config/redis.conf:/usr/local/etc/redis/redis.conf:ro
- ./work/components/redis/log/redis.log:/var/log/redis/redis.log:rw
restart: always
privileged: true
networks:
- net-redis
### Tools container #########################################
tools:
build:
context: ./build/tools
args:
TIME_ZONE: ${GLOBAL_TIME_ZONE}
CHANGE_SOURCE: ${GLOBAL_CHANGE_SOURCE}
volumes:
- ./work/components/tools/start.sh:/home/start.sh:rw
- ./work/components/tools/backup:/backup:rw
- ./work/components/tools/cron.d:/etc/cron.d:rw
restart: always
privileged: true
networks:
- net-php
- net-mysql
- net-redis
networks:
net-php:
net-mysql:
net-redis: