-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
55 lines (50 loc) · 1.5 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
version: "3.8"
networks:
user-net:
driver: bridge
services:
traefik:
image: traefik:v3.0
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
ports:
- "80:80" # Expose HTTP
- "8080:8080" # Expose Traefik dashboard
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro" # Allow Traefik to listen to Docker
networks:
- user-net
user-frontend:
image: user-frontend:1.1
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=Host(`frontend.localhost`)"
- "traefik.http.services.frontend.loadbalancer.server.port=80"
depends_on:
- user-backend
networks:
- user-net
user-backend:
image: user-backend:1.1
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=Host(`backend.localhost`)"
- "traefik.http.services.backend.loadbalancer.server.port=8082"
- "traefik.http.middlewares.backend-rewrite.replacepathregex.regex=^/api/(.*)"
- "traefik.http.middlewares.backend-rewrite.replacepathregex.replacement=/api/$$1"
- "traefik.http.routers.backend.middlewares=backend-rewrite"
networks:
- user-net
watchtower:
image: containrrr/watchtower:latest
command: >
--cleanup
--interval 60
--notification-slack-hook-url ${DISCORD_WEBHOOK_URL}
--no-pull
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
networks:
- user-net