-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.rabbitmq.yml
More file actions
81 lines (78 loc) · 2.84 KB
/
docker-compose.rabbitmq.yml
File metadata and controls
81 lines (78 loc) · 2.84 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
services:
# ========== APPLICATION SERVICES ==========
protectedpayment.order.api:
image: ${DOCKER_REGISTRY-}protectedpaymentorderapi
container_name: ProtectedPayment.Order.Api
build:
context: .
dockerfile: src/ProtectedPayment.Order.API/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_HTTP_PORTS=8080
- BUS_SERVICE_TYPE=RabbitMQ
- ConnectionStrings__Database=Host=protectedpayment.database;Port=5432;Database=protectedPaymentApp;Username=postgres;Password=postgres;Include Error Detail=true
- ServiceBusOption__RabbitMqConnectionString=amqp://protected-payment-queue-rabbitmq:5672
ports:
- 5300:8080
volumes:
- ${APPDATA}/Microsoft/UserSecrets:/home/app/.microsoft/usersecrets:ro
- ${APPDATA}/ASP.NET/Https:/home/app/.aspnet/https:ro
depends_on:
protectedpayment.database:
condition: service_healthy
protectedpayment.queue.rabbitmq:
condition: service_healthy
protectedpayment.worker:
image: ${DOCKER_REGISTRY-}protectedpaymentworker
container_name: ProtectedPayment.Worker
build:
context: .
dockerfile: src/ProtectedPayment.Worker/Dockerfile
environment:
- DOTNET_ENVIRONMENT=Development
- BUS_SERVICE_TYPE=RabbitMQ
- ConnectionStrings__Database=Host=protectedpayment.database;Port=5432;Database=protectedPaymentApp;Username=postgres;Password=postgres;Include Error Detail=true
- ServiceBusOption__RabbitMqConnectionString=amqp://protected-payment-queue-rabbitmq:5672
volumes:
- ${APPDATA}/Microsoft/UserSecrets:/home/app/.microsoft/usersecrets:ro
depends_on:
protectedpayment.database:
condition: service_healthy
protectedpayment.queue.rabbitmq:
condition: service_healthy
protectedpayment.order.api:
condition: service_started
# ========== DATABASE (Her zaman çalışır) ==========
protectedpayment.database:
image: postgres:latest
container_name: ProtectedPayment.Database
restart: always
volumes:
- ./.containers/database:/var/lib/postgresql
ports:
- 15432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# ========== RabbitMQ ==========
protectedpayment.queue.rabbitmq:
image: rabbitmq:management-alpine
container_name: ProtectedPayment.Queue.RabbitMQ
restart: always
hostname: protected-payment-queue-rabbitmq
volumes:
- ./.containers/queue/data/:/var/lib/rabbitmq
- ./.containers/queue/log/:/var/log/rabbitmq
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- 5672:5672
- 15672:15672
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "ping"]
interval: 10s
timeout: 5s
retries: 5