-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
62 lines (59 loc) · 1.69 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
services:
points-of-interest:
build:
context: .
dockerfile: Dockerfile
restart: always
container_name: points-of-interest
env_file:
- config/local.env
volumes:
- ./:/var/www/html
points-of-interest-adm:
image: mysql:8.1
restart: always
hostname: points-of-interest-adm
container_name: points-of-interest-adm
ports:
- "3306:3306"
environment:
TZ: "America/Sao_Paulo"
MYSQL_ROOT_PASSWORD: "root"
command: --default-authentication-plugin=mysql_native_password
volumes:
- ./db/mysql/config:/scripts/config
- ./db/mysql/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
nginx:
container_name: nginx
image: nginx:1.27-alpine
restart: always
depends_on:
- points-of-interest
volumes:
- ./public:/var/www/html
- ./config/nginx/site.conf:/etc/nginx/conf.d/site.conf
labels:
- "traefik.enable=true"
- "traefik.http.routers.nginx.entrypoints=http"
- "traefik.http.routers.nginx.rule=Host(`points-of-interest.localhost`)"
reverse-proxy:
image: traefik:3.2
restart: always
container_name: reverse-proxy
command:
- "--log.level=INFO"
- "--accesslog=true"
- "--api.insecure=true"
- "--api.dashboard=true"
- "--providers.docker=true"
- "--entrypoints.http.address=:80"
- "--providers.docker.exposedbydefault=false"
ports:
- "80:80"
- "8080:8080"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.rule=Host(`traefik.localhost`)"
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro