-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (82 loc) · 2.57 KB
/
Copy pathdocker-compose.yml
File metadata and controls
86 lines (82 loc) · 2.57 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
74
75
76
77
78
79
80
81
82
83
84
85
86
services:
catalog-service-api:
build:
context: .
dockerfile: src/CatalogService/CatalogService.Api/Dockerfile
container_name: micros-02-catalog-service-api
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_HTTP_PORTS: 8080
ConnectionStrings__CatalogDatabase: Host=catalog-service-db;Port=5432;Database=catalog_service;Username=catalog_user;Password=catalog_password
PricingService__BaseUrl: http://pricing-service-api:8080
PricingService__TimeoutSeconds: 3
PricingService__RetryCount: 2
PricingService__RetryDelayMilliseconds: 200
ports:
- "5101:8080"
depends_on:
catalog-service-db:
condition: service_healthy
pricing-service-api:
condition: service_started
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health/ready"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
pricing-service-api:
build:
context: .
dockerfile: src/PricingService/PricingService.Api/Dockerfile
container_name: micros-02-pricing-service-api
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_HTTP_PORTS: 8080
ConnectionStrings__PricingDatabase: Host=pricing-service-db;Port=5432;Database=pricing_service;Username=pricing_user;Password=pricing_password
ports:
- "5102:8080"
depends_on:
pricing-service-db:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health/ready"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
catalog-service-db:
image: postgres:18
container_name: micros-02-catalog-service-db
environment:
POSTGRES_DB: catalog_service
POSTGRES_USER: catalog_user
POSTGRES_PASSWORD: catalog_password
ports:
- "5433:5432"
volumes:
- catalog_service_db_data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U catalog_user -d catalog_service"]
interval: 10s
timeout: 5s
retries: 5
pricing-service-db:
image: postgres:18
container_name: micros-02-pricing-service-db
environment:
POSTGRES_DB: pricing_service
POSTGRES_USER: pricing_user
POSTGRES_PASSWORD: pricing_password
ports:
- "5434:5432"
volumes:
- pricing_service_db_data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U pricing_user -d pricing_service"]
interval: 10s
timeout: 5s
retries: 5
volumes:
catalog_service_db_data:
pricing_service_db_data: