-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
117 lines (111 loc) · 2.93 KB
/
compose.yaml
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
x-restart-always: &restart-always
restart: always
services:
phpfpm:
build:
context: .
dockerfile: Dockerfile
target: local
args:
UID: ${UID:-10000}
GID: ${GID:-10001}
user: "${UID:-10000}:${GID:-10001}"
<<: [*restart-always]
environment:
PHP_OPCACHE_ENABLE: ${OPCACHE_ENABLE:-"0"}
OPCACHE_ENABLE_CLI: ${OPCACHE_ENABLE_CLI:-"0"}
OPCACHE_ENABLE_FREQ: ${OPCACHE_ENABLE_FREQ:-"0"}
OPCACHE_VALIDATE_TIMESTAMPS: ${OPCACHE_VALIDATE_TIMESTAMPS:-"1"}
OPCACHE_MAX_ACCELERATED_FILES: ${OPCACHE_MAX_ACCELERATED_FILES:-"10000"}
OPCACHE_MEMORY_CONSUMPTION: ${OPCACHE_MEMORY_CONSUMPTION:-"256"}
OPCACHE_MAX_WASTED_PERCENTAGE: ${OPCACHE_MAX_WASTED_PERCENTAGE:-"5"}
OPCACHE_INTERNED_STRINGS_BUFFER: ${OPCACHE_INTERNED_STRINGS_BUFFER:-"12"}
OPCACHE_PRELOAD: ${OPCACHE_PRELOAD:-"/app/var/cache/${APP_ENV}/App_KernelProdContainer.preload.php"}
volumes:
- .:/app
networks:
- webapp
---
services:
nginx:
build:
context: .docker/nginx
dockerfile: Dockerfile
args:
NGINX_IMAGE_VERSION: ${NGINX_IMAGE_VERSION}
security_opt:
- no-new-privileges:true
<<: [*restart-always]
volumes:
- .:/app
labels:
traefik.enable: true
traefik.docker.network: proxy
traefik.http.routers.webapp-nginx.priority: 100
traefik.http.routers.webapp-nginx.tls: true
traefik.http.routers.webapp-nginx.entrypoints: websecure
traefik.http.routers.webapp-nginx.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.webapp-nginx.service: webapp-nginx
traefik.http.services.webapp-nginx.loadbalancer.server.port: 80
networks:
- webapp
- proxy
mysql:
build:
context: .docker/mysql
dockerfile: Dockerfile
args:
MYSQL_IMAGE_VERSION: ${MYSQL_IMAGE_VERSION}
cap_add:
- SYS_NICE
security_opt:
- no-new-privileges:true
logging:
options:
max-size: "50m"
max-file: "5"
ports:
- "3307:3306"
<<: [*restart-always]
environment:
MYSQL_USER: ${DATABASE_USER}
MYSQL_DATABASE: ${DATABASE_NAME}
MYSQL_ROOT_PASSWORD: ${DATABASE_ROOT_PASSWORD}
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
volumes:
- mysql_data:/var/lib/mysql
- mysql_log:/var/log/mysql
- ~/db-init/mysql/webapp:/docker-entrypoint-initdb.d
networks:
- webapp
node:
image: timbru31/node-alpine-git:${NODE_IMAGE_VERSION}
working_dir: /app
security_opt:
- no-new-privileges:true
profiles:
- dev
restart: "no"
volumes:
- .:/app
depends_on:
- phpfpm
wait:
image: waisbrot/wait
environment:
TARGETS: mysql:3306 nginx:80
TIMEOUT: 300
networks:
- webapp
volumes:
mysql_data:
driver: local
mysql_log:
driver: local
apache_log:
driver: local
networks:
webapp:
driver: bridge
proxy:
external: true