Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (69 loc) · 1.95 KB
/
Copy pathdocker-compose.yml
File metadata and controls
73 lines (69 loc) · 1.95 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:
postgres:
image: postgres:15-alpine
container_name: confighub-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: ConfigHubDb
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 10s
retries: 10
restart: unless-stopped
rabbitmq:
image: rabbitmq:management-alpine
container_name: confighub-rabbitmq
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- "5672:5672" # Uygulama bağlantı portu
- "15672:15672" # Tarayıcı Yönetim Ekranı portu
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "check_port_connectivity"]
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
config_api:
build:
context: .
dockerfile: DistributedConfigHub.Api/Dockerfile
container_name: confighub-api
ports:
- "5173:8080"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ConnectionStrings__DefaultConnection=Host=postgres;Database=ConfigHubDb;Username=postgres;Password=postgres
- RabbitMQ__HostName=rabbitmq
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
restart: unless-stopped
demo_consumer:
build:
context: .
dockerfile: DemoConsumerApp/Dockerfile
container_name: confighub-demo
ports:
- "5174:8080"
environment:
- ASPNETCORE_ENVIRONMENT=Production # Can be configured for Development, Staging and Production.
- DistributedConfig__ApiBaseUrl=http://config_api:8080
- DistributedConfig__RabbitMqHostName=rabbitmq
depends_on:
config_api:
condition: service_started
rabbitmq:
condition: service_healthy
restart: unless-stopped
volumes:
postgres_data: