-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
62 lines (59 loc) · 1.66 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:
cheap-delivery:
build:
context: .
dockerfile: Dockerfile
restart: always
container_name: cheap-delivery
env_file:
- ./config/local.env
volumes:
- ./:/var/www/html
cheap-delivery-adm:
image: mysql:8.1
restart: always
hostname: cheap-delivery-adm
container_name: cheap-delivery-adm
ports:
- "3307: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:
image: nginx:1.27-alpine
restart: always
container_name: nginx
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(`cheap-delivery.localhost`)"
depends_on:
- cheap-delivery
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