-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
153 lines (145 loc) · 4.66 KB
/
docker-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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
networks:
services-network:
driver: bridge
services:
services-db:
image: "mcr.microsoft.com/mssql/server:2022-latest"
container_name: "services-db"
ports:
- "1433:1433"
# volumes:
# - sqlsystem:/var/opt/mssql/
# - sqldata:/var/opt/sqlserver/data
# - sqllog:/var/opt/sqlserver/log
# - sqlbackup:/var/opt/sqlserver/backu[p
environment:
SA_PASSWORD: "dev@1234"
ACCEPT_EULA: "Y"
networks:
- services-network
rabbitmq-service:
image: masstransit/rabbitmq
container_name: rabbitmq-service
ports:
- 15672:15672
- 5672:5672
networks:
- services-network
cache-service:
image: redis:6.2-alpine
container_name: cache-service
restart: always
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
networks:
- services-network
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0
ports:
- 9200:9200
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
environment:
- xpack.security.enabled=false
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
networks:
- services-network
kibana:
container_name: kibana
image: docker.elastic.co/kibana/kibana:8.11.0
ports:
- 5601:5601
depends_on:
- elasticsearch
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- SERVER_PUBLICBASEURL=http://localhost:5601
networks:
- services-network
auction-service:
image: yagooliverce/auction-service:latest
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=http://+:80;https://+:443
- ConnectionStrings__AuctionServiceDb=Server=services-db;Database=AuctionService;User=sa;Password=dev@1234;Trust Server Certificate=True;
- ConnectionStrings__RedisConnection=cache-service:6379,password=eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
- BackgroundService__ExecutionIntervalInMilliseconds=60000
- RabbitMQ__Host=rabbitmq-service
- RabbitMQ__VirtualHost=/
- RabbitMQ__Username=guest
- RabbitMQ__Password=guest
- RabbitMQ__QueueName=auction-service
- ElasticConfiguration__Uri=http://elasticsearch:9200
- ElasticConfiguration__ServiceName=auctions-service
- ASPNETCORE_Kestrel__Certificates__Default__Path=/app/certs/localhost.pfx
- ASPNETCORE_Kestrel__Certificates__Default__Password=password123
volumes:
- ./devcerts:/app/certs:ro
networks:
- services-network
depends_on:
- services-db
- rabbitmq-service
- cache-service
- elasticsearch
bid-service:
image: yagooliverce/bid-service:latest
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=http://+:80;https://+:443
- ConnectionStrings__BidServiceDb=Server=services-db;Database=BidService;User=sa;Password=dev@1234;Trust Server Certificate=True;
- ConnectionStrings__RedisConnection=cache-service:6379,password=eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
- RabbitMQ__Host=rabbitmq-service
- RabbitMQ__VirtualHost=/
- RabbitMQ__Username=guest
- RabbitMQ__Password=guest
- RabbitMQ__QueueName=bid-service
- ElasticConfiguration__Uri=http://elasticsearch:9200
- ElasticConfiguration__ServiceName=bids-service
- ASPNETCORE_Kestrel__Certificates__Default__Path=/app/certs/localhost.pfx
- ASPNETCORE_Kestrel__Certificates__Default__Password=password123
volumes:
- ./devcerts:/app/certs:ro
networks:
- services-network
depends_on:
- services-db
- rabbitmq-service
- cache-service
- elasticsearch
- auction-service
api-gateway:
image: yagooliverce/api-gateway:latest
container_name: api-gateway
ports:
- "9000:80"
- "11000:443"
environment:
- ASPNETCORE_ENVIRONMENT=Docker
- ReverseProxy__Clusters__auctions__Destinations__auctionApi__Address=http://auction-service/
- ReverseProxy__Clusters__bids__LoadBalancingPolicy=RoundRobin
- ReverseProxy__Clusters__bids__Destinations__bidApi__Address=http://bid-service/
- ASPNETCORE_Kestrel__Certificates__Default__Path=/app/certs/localhost.pfx
- ASPNETCORE_Kestrel__Certificates__Default__Password=password123
volumes:
- ./devcerts:/app/certs:ro
networks:
- services-network
depends_on:
- bid-service
- auction-service
volumes:
# sqlsystem:
# sqldata:
# sqllog:
# sqlbackup:
elasticsearch-data: