-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
73 lines (69 loc) · 2.21 KB
/
compose.yaml
File metadata and controls
73 lines (69 loc) · 2.21 KB
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
services:
traefik:
image: traefik
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
inventoryservice:
image: development/inventoryservice
pull_policy: never
labels:
# HTTP Router
- "traefik.http.routers.inventory.rule=PathPrefix(`/api/inventory`)"
- "traefik.http.routers.inventory.service=inventory-rest"
- "traefik.http.services.inventory-rest.loadbalancer.server.port=8080"
# gRPC Router
- "traefik.http.routers.inventory-grpc.rule=PathPrefix(`/rpc`)"
- "traefik.http.routers.inventory-grpc.service=inventory-grpc"
- "traefik.http.services.inventory-grpc.loadbalancer.server.port=9090"
- "traefik.http.services.inventory-grpc.loadbalancer.server.scheme=h2c"
build:
context: InventoryService
dockerfile: Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: "Development"
depends_on:
rabbitmq:
condition: service_healthy
lendingservice:
image: development/lendingservice
pull_policy: never
labels:
# Books
- "traefik.http.routers.books.rule=PathPrefix(`/api/books`)"
- "traefik.http.routers.books.service=lending-internal"
# Lending
- "traefik.http.routers.lending.rule=PathPrefix(`/api/lending`)"
- "traefik.http.routers.lending.service=lending-internal"
# Shared service port
- "traefik.http.services.lending-internal.loadbalancer.server.port=8080"
build:
context: LendingService
dockerfile: Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: "Development"
ports:
- "5136:8080"
depends_on:
rabbitmq:
condition: service_healthy
rabbitmq:
image: rabbitmq:4-management
labels:
- "traefik.http.routers.rabbitmq.rule=PathPrefix(`/rabbitmq`)"
- "traefik.http.services.rabbitmq.loadbalancer.server.port=15672"
ports:
- "5672:5672"
- "15672:15672"
healthcheck:
test: [ "CMD", "rabbitmq-diagnostics", "-q", "ping" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s