-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
101 lines (94 loc) · 2.17 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
x-restart-always: &restart-always
restart: always
services:
phpfpm:
extends:
file: compose.common.yaml
service: php
<<: [*restart-always]
logging:
options:
max-size: "25mb"
max-file: "10"
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
- ./.docker/mysql/init:/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