-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.redis.yml
More file actions
77 lines (73 loc) · 2.4 KB
/
docker-compose.redis.yml
File metadata and controls
77 lines (73 loc) · 2.4 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
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=Redis
- ConnectionStrings__Database=Host=protectedpayment.database;Port=5432;Database=protectedPaymentApp;Username=postgres;Password=postgres;Include Error Detail=true
- ServiceBusOption__RedisBootstrapServers=protectedpayment.queue.redis:6379
ports:
- 5300:8080
depends_on:
protectedpayment.database:
condition: service_healthy
protectedpayment.queue.redis:
condition: service_healthy
protectedpayment.worker:
image: ${DOCKER_REGISTRY-}protectedpaymentworker
container_name: ProtectedPayment.Worker
build:
context: .
dockerfile: src/ProtectedPayment.Worker/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- BUS_SERVICE_TYPE=Redis
- ConnectionStrings__Database=Host=protectedpayment.database;Port=5432;Database=protectedPaymentApp;Username=postgres;Password=postgres;Include Error Detail=true
- ServiceBusOption__RedisBootstrapServers=protectedpayment.queue.redis:6379
depends_on:
protectedpayment.database:
condition: service_healthy
protectedpayment.queue.redis:
condition: service_healthy
# ========== 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
# ========== Redis ==========
protectedpayment.queue.redis:
image: redis:7.2-alpine
container_name: ProtectedPayment.Queue.Redis
ports:
- "6379:6379"
command: >
redis-server
--appendonly yes
--appendfsync everysec
--save 60 1
volumes:
- redis_data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
redis_data:
driver: local