-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
145 lines (136 loc) · 3.16 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
version: '3.7'
volumes:
database:
driver: ${VOLUMES_DRIVER}
redis:
driver: ${VOLUMES_DRIVER}
workspace:
driver: ${VOLUMES_DRIVER}
nginx:
driver: ${VOLUMES_DRIVER}
phpfpm:
driver: ${VOLUMES_DRIVER}
worker:
driver: ${VOLUMES_DRIVER}
networks:
backend:
driver: ${NETWORKS_DRIVER}
# Define services
# Uncomment ports if you will not use override file
services:
### Database Container #################################
database:
build:
context: ./docker/database
args:
- TZ=${WORKSPACE_TIMEZONE}
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- ./docker/storage/database:/var/lib/mysql
- ${MYSQL_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
#ports:
#- 3306:3306
networks:
- backend
### Redis Container #########################################
redis:
build:
context: ./docker/redis
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
volumes:
- ./docker/storage/redis:/data
sysctls:
- net.core.somaxconn=65535
#ports:
#- 6379:6379
networks:
- backend
### Workspace Container ###############################
workspace:
tty: true
build:
context: ./docker/workspace
args:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${WORKSPACE_TIMEZONE}
volumes:
- ./src:/home/app/src:delegated
depends_on:
- database
- redis
networks:
- backend
links:
- database
- redis
### Nginx Container ###############################
nginx:
build:
context: ./docker/nginx
args:
- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
volumes:
- ./src:/var/www/html
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx
- ${NGINX_SITES_PATH}:/etc/nginx/sites-available
- ${NGINX_SSL_PATH}:/etc/nginx/ssl
#ports:
#- 80:80
#- 443:443
depends_on:
- phpfpm
networks:
- backend
links:
- phpfpm
### PHPFPM Container ###############################
phpfpm:
build:
context: ./docker/phpfpm
args:
- PUID=${PUID}
- TZ=${WORKSPACE_TIMEZONE}
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
- INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE}
volumes:
- ./docker/phpfpm/php.ini:/usr/local/etc/php/php.ini
- ./src:/var/www/html
#ports:
#- 9000
depends_on:
- database
- redis
networks:
- backend
links:
- database
- redis
### PHP Worker Container ###############################
worker:
build:
context: ./docker/worker
args:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${WORKSPACE_TIMEZONE}
volumes:
- ./src:/var/www/html
- ${WORKER_LOG_PATH}:/var/log/supervisord
- ./docker/worker/supervisord.d:/etc/supervisord.d
#ports:
#- 9001:9001
depends_on:
- database
- redis
networks:
- backend
links:
- database
- redis