-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
132 lines (124 loc) · 3.01 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
version: "3.9"
services:
broker-service:
container_name: brokerApp
build:
context: ./broker-service
dockerfile: ./broker-service.dockerfile
environment:
- RABBITMQ_URI=amqp://guest:guest@rabbitmq:5672
ports:
- "8080:5000"
deploy:
mode: replicated
replicas: 1
payment-service:
container_name: paymentApp
build:
context: ./payment-service
dockerfile: ./payment-service.dockerfile
env_file:
- ./payment-service/.env
ports:
- "8083:5000"
deploy:
mode: replicated
replicas: 1
authentication-service:
container_name: authApp
build:
context: ./authentication-service
dockerfile: ./authentication-service.dockerfile
environment:
- DB_URL=postgresql://postgres:secret@postgres:5432/authdb?sslmode=disable
restart: always
deploy:
mode: replicated
replicas: 1
depends_on:
postgres:
condition: service_healthy
postgres:
container_name: postgres
image: postgres:alpine3.19
environment:
- POSTGRES_PASSWORD=secret
- POSTGRES_USER=postgres
- POSTGRES_DB=authdb
- PGUSER=postgres
ports:
- "5432:5432"
restart: always
deploy:
mode: replicated
replicas: 1
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
volumes:
- ./db-data/postgres/:/var/lib/postgresql/data/
logger-service:
container_name: loggerApp
build:
context: ./logger-service
dockerfile: ./logger-service.dockerfile
environment:
- DB_URL=postgresql://admin:verysecret@log-postgres/loggerdb?sslmode=disable
deploy:
mode: replicated
replicas: 1
restart: always
depends_on:
log-postgres:
condition: service_healthy
log-postgres:
container_name: log-postgres
image: postgres:alpine3.19
ports:
- "5431:5432"
environment:
- POSTGRES_USER=admin
- POSTGRES_DB=loggerdb
- POSTGRES_PASSWORD=verysecret
- PGUSER=admin
deploy:
mode: replicated
replicas: 1
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
volumes:
- ./db-data/log-postgres/:/var/lib/postgresql/data/
depends_on:
postgres:
condition: service_healthy
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3.13.3-management
ports:
- "5672:5672"
- "15672:15672"
volumes:
- ./rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
environment:
- RABBITMQ_ERLANG_COOKIE=secretcookie
- RABBITMQ_NODENAME=rabbit@rabbitmq
deploy:
mode: replicated
replicas: 1
listener-service:
container_name: listenerApp
build:
context: ./listener-service
dockerfile: ./listener-service.dockerfile
environment:
- RABBITMQ_URI=amqp://guest:guest@rabbitmq:5672
deploy:
mode: replicated
replicas: 1