forked from DescartesResearch/TeaStore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose_h1.yaml
118 lines (117 loc) · 3.68 KB
/
docker-compose_h1.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: '3.9'
services:
gateway:
# Traefik v2.5
image: traefik:v2.5.2
# Configuration
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--entryPoints.http1.address=:80"
ports:
# The HTTP port
- "80:80"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
db:
build: database
ports:
- "3306:3306"
labels:
- "traefik.enable=false"
persistence:
build: services/persistence
depends_on:
- db
expose:
- "80"
environment:
HTTP_VERSION: "HTTP/1.1"
HOST_NAME: "persistence"
GATEWAY_HOST: "gateway"
PERSISTENCE_PORT: "80"
DB_HOST: "db"
DB_PORT: "3306"
labels:
- "traefik.http.routers.persistence.rule=Host(`gateway`) && PathPrefix(`/api/persistence`)"
- "traefik.http.routers.persistence.entrypoints=http1"
- "traefik.http.routers.persistence.tls=false"
- "traefik.http.routers.persistence.service=persistence"
- "traefik.http.services.persistence.loadbalancer.server.port=80"
- "traefik.http.services.persistence.loadbalancer.server.scheme=http"
auth:
build: services/auth
depends_on:
- persistence
expose:
- "80"
environment:
HTTP_VERSION: "HTTP/1.1"
HOST_NAME: "auth"
GATEWAY_HOST: "gateway"
AUTH_PORT: "80"
labels:
- "traefik.http.routers.auth.rule=Host(`gateway`) && PathPrefix(`/api/auth`)"
- "traefik.http.routers.auth.entrypoints=http1"
- "traefik.http.routers.auth.tls=false"
- "traefik.http.routers.auth.service=auth"
- "traefik.http.services.auth.loadbalancer.server.port=80"
- "traefik.http.services.auth.loadbalancer.server.scheme=http"
web:
build: services/web
depends_on:
- auth
expose:
- "80"
environment:
HTTP_VERSION: "HTTP/1.1"
HOST_NAME: "web"
GATEWAY_HOST: "gateway"
WEB_PORT: "80"
labels:
- "traefik.http.routers.web.rule=Host(`localhost`) && PathPrefix(`/api/web`)"
- "traefik.http.routers.web.entrypoints=http1"
- "traefik.http.routers.web.tls=false"
- "traefik.http.routers.web.service=web"
- "traefik.http.services.web.loadbalancer.server.port=80"
- "traefik.http.services.web.loadbalancer.server.scheme=http"
image:
build: services/image
depends_on:
- persistence
expose:
- "80"
environment:
HTTP_VERSION: "HTTP/1.1"
HOST_NAME: "image"
GATEWAY_HOST: "gateway"
IMAGE_PORT: "80"
labels:
- "traefik.http.routers.image.rule=Host(`gateway`) && PathPrefix(`/api/image`)"
- "traefik.http.routers.image.entrypoints=http1"
- "traefik.http.routers.image.tls=false"
- "traefik.http.routers.image.service=image"
- "traefik.http.services.image.loadbalancer.server.port=80"
- "traefik.http.services.image.loadbalancer.server.scheme=http"
recommender:
build: services/recommender
depends_on:
- persistence
expose:
- "80"
environment:
HTTP_VERSION: "HTTP/1.1"
HOST_NAME: "recommender"
GATEWAY_HOST: "gateway"
RECOMMENDER_PORT: "80"
labels:
- "traefik.http.routers.recommender.rule=Host(`gateway`) && PathPrefix(`/api/recommender`)"
- "traefik.http.routers.recommender.entrypoints=http1"
- "traefik.http.routers.recommender.tls=false"
- "traefik.http.routers.recommender.service=recommender"
- "traefik.http.services.recommender.loadbalancer.server.port=80"
- "traefik.http.services.recommender.loadbalancer.server.scheme=http"