-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-production.yml
executable file
·59 lines (54 loc) · 1.58 KB
/
docker-compose-production.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
version: '3.9'
networks:
bot-network:
traefik-public:
external: true
services:
nginx:
build:
context: .
dockerfile: docker/prod/Nginx/Dockerfile
container_name: nginx
volumes:
- vendor:/app/vendor
networks:
- bot-network
- traefik-public
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.http.routers.nginx.rule=Host(`kiipod.ru`) || Host(`www.kiipod.ru`)
- traefik.http.services.nginx.loadBalancer.server.port=80
- traefik.http.middlewares.nginx-redirect.redirectRegex.regex=^(https?://)www.kiipod.ru/(.*)$$
- traefik.http.middlewares.nginx-redirect.redirectRegex.replacement=$${1}kiipod.ru/$${2}
- traefik.http.middlewares.nginx-redirect.redirectRegex.permanent=true
- traefik.http.routers.nginx.middlewares=nginx-redirect,secure-headers
- traefik.http.routers.nginx.entryPoints=https
- traefik.http.routers.nginx.tls=true
- traefik.http.routers.nginx.tls.certResolver=letsEncrypt
app:
build:
context: .
dockerfile: docker/prod/App/Dockerfile
container_name: app
volumes:
- vendor:/app/vendor
networks:
- bot-network
mysql:
build:
context: .
dockerfile: docker/prod/MySQL/Dockerfile
container_name: mysql
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USERNAME}
MYSQL_PASSWORD: ${MYSQL_USER_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
volumes:
- mysql:/var/lib/mysql
networks:
- bot-network
volumes:
vendor:
mysql: