-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcompose.yml
61 lines (56 loc) · 1.31 KB
/
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
name: "yarpconsul"
services:
## YARP Proxy ##
yarp:
container_name: yarp_proxy
build:
context: ./CCProxy
dockerfile: Dockerfile
ports:
- "5000:5000"
environment:
- ASPNETCORE_ENVIRONMENT=Docker
depends_on:
consul:
condition: service_started
## Fixed Items API ##
itemsapi_fixed:
build:
context: ./ItemsApi
dockerfile: Dockerfile
ports:
- "5010:5000"
environment:
- ASPNETCORE_ENVIRONMENT=Docker
depends_on:
consul:
condition: service_started
## Replicatable Items API ##
## This one doesn't bind to a host port so it can be replicated
itemsapi:
build:
context: ./ItemsApi
dockerfile: Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Docker
deploy:
mode: replicated
replicas: 2
depends_on:
consul:
condition: service_started
consul:
container_name: consul_service
image: hashicorp/consul:1.18
restart: unless-stopped
ports:
- "8500:8500" # HTTP API and UI port
- "8600:8600" # DNS Port
command: consul agent -dev -config-dir /etc/consul.d
volumes:
- ./.tmp/consul/data:/opt/consul
- ./consul.server.json:/etc/consul.d/consul.server.json:ro
networks:
default:
name: yarp_proxy
driver: bridge