-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
113 lines (94 loc) · 2.74 KB
/
docker-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
version: "3.9"
services:
iginx:
container_name :
"${PROJECT_NAME}_nginx"
build:
context:
./docker/nginx
dockerfile: Dockerfile
depends_on:
- smt
volumes:
- ./:/var/www/vhost/smt/
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./docker/nginx/nginx.d:/etc/nginx/conf.d
- ./docker/nginx/ssl:/etc/nginx/ssl
working_dir: /var/www/vhost
ports:
- '443:443'
- '9008:9008'
networks:
- smt
labels:
- 'traefik.http.routers.${PROJECT_NAME}_nginx.rule=HostRegexp(`${APP_DOMAIN}`,`{subdomain:[a-z]+.${APP_DOMAIN}}`)'
- 'traefik.http.routers.${PROJECT_NAME}_nginx.priority=1'
- 'traefik.docker.network=proxy'
smt:
container_name: "${PROJECT_NAME}_php"
build:
context: ./docker/php
dockerfile: Dockerfile
args:
user: 'root'
uid: 1000
environment:
PHP_MEMORY_LIMIT: '512M'
COMPOSER_MEMORY_LIMIT: '-1'
working_dir: /var/www/vhost/smt/
volumes:
- ./:/var/www/vhost/smt/
ports:
- '9003:9003'
networks:
- smt
mariadb:
image: mariadb:latest
container_name: "${PROJECT_NAME}_mysql"
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
MYSQL_DATABASE: '${DB_DATABASE}'
MYSQL_USER: '${DB_USERNAME}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ROOT_HOST: '%'
MYSQL_ALLOW_EMPTY_PASSWORD: 'YES'
command: mysql --character-set-server=utf8mb4 --collaction-server
volumes:
- 'smt_mysql:/data'
ports:
- '${FORWORD_DB_PORT:-4406}:3306'
networks:
- smt
traefik:
image: traefik:v2.10
container_name: "${PROJECT_NAME}_traefik"
restart: always
command:
- --entrypoints.web.address=:80
- --providers.docker=true
- --api.insecure=true
- --log.level=debug
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
ports:
- '80:80'
- '8080:8080'
networks:
- smt
redis:
image: redis
container_name : "${PROJECT_NAME}_redis"
ports:
- '6379:6379'
volumes:
- 'smt_redis:/data'
networks:
- smt
networks:
smt:
driver: bridge
volumes:
smt_mysql:
driver: local
smt_redis:
driver: local