forked from devonfw/my-thai-star
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.traefik.yml
50 lines (48 loc) · 1.67 KB
/
docker-compose.traefik.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
version: "3"
services:
reverse-proxy:
restart: always
image: traefik:2.0
command:
- "--api.dashboard=true"
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
networks:
- my-thai-star
ports:
- "8081:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
labels:
- "traefik.enable=false"
java:
build: "java/"
restart: always
image: my-thai-star/java:latest
networks:
- my-thai-star
labels:
- "traefik.http.routers.java.rule=PathPrefix(`/api/`)"
- "traefik.http.routers.java.middlewares=fixpath"
- "traefik.http.middlewares.fixpath.chain.middlewares=remove-api,add-mythaistar"
- "traefik.http.middlewares.remove-api.stripprefix.prefixes=/api"
- "traefik.http.middlewares.add-mythaistar.addprefix.prefix=/mythaistar"
- "traefik.http.services.java.loadBalancer.healthcheck.path=/mythaistar/services/rest/dishmanagement/v1/category/0/"
- "traefik.http.services.java.loadBalancer.healthcheck.interval=10s"
- "traefik.http.services.java.loadBalancer.healthcheck.scheme=http"
angular:
build: "angular/"
restart: always
image: my-thai-star/angular:latest
networks:
- my-thai-star
labels:
- "traefik.http.routers.angular.rule=PathPrefix(`/`)"
- "traefik.http.services.angular.loadBalancer.healthcheck.path=/health"
- "traefik.http.services.angular.loadBalancer.healthcheck.interval=10s"
- "traefik.http.services.angular.loadBalancer.healthcheck.scheme=http"
networks:
my-thai-star:
driver: bridge