-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-local.yaml
191 lines (175 loc) · 4.92 KB
/
docker-compose-local.yaml
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
version: "3.9"
volumes:
redis_data:
auth_db_data:
post_db_data:
interaction_db_data:
moderation_db_data:
engagement_db_data:
services:
redis:
image: redis:alpine3.17
volumes:
- "redis_data:/data"
ports:
- "6379:6379"
restart: on-failure
authpostgres:
image: postgres:alpine3.17
environment:
POSTGRES_USER: "root"
POSTGRES_PASSWORD: "admin"
POSTGRES_DB: "authdb"
ports:
- "5432:5432"
volumes:
- auth_db_data:/var/lib/postgresql/data
restart: unless-stopped
auth_backend:
build:
context: ./auth-service
dockerfile: Dockerfile
command: uvicorn apps.main:app --host 0.0.0.0 --port 8000
volumes:
- ./auth-service:/code/
environment:
- DATABASE_URL=postgres://root:admin@authpostgres:5432/authdb
- SECRET_KEY=8c6bf0f1b38792f53b1eea89cdf30109a1eceba49d2f0258cd50d31ea4562da7
- REDIS_URL=redis://redis:6379
ports:
- 8000:8000
depends_on:
- redis
- authpostgres
restart: always
postpostgres:
image: postgres:alpine3.17
environment:
POSTGRES_USER: "root"
POSTGRES_PASSWORD: "admin"
POSTGRES_DB: "postdb"
PGPORT: 5433
ports:
- "5433:5433"
volumes:
- post_db_data:/var/lib/postgresql/data
restart: unless-stopped
post_backend:
build:
context: ./post-service
dockerfile: Dockerfile
command: uvicorn apps.main:app --host 0.0.0.0 --port 8001
volumes:
- ./post-service:/code/
environment:
- DATABASE_URL=postgres://root:admin@postpostgres:5433/postdb
- SECRET_KEY=8c6bf0f1b38792f53b1eea89cdf30109a1eceba49d2f0258cd50d31ea4562da7
- AUTHENTICATION_VERIFICATION_URL=http://auth_backend:8000/api/v1/auth/verify-token
- REDIS_URL=redis://redis:6379
ports:
- 8001:8001
depends_on:
- redis
- auth_backend
- postpostgres
restart: always
interactionpostgres:
image: postgres:alpine3.17
environment:
POSTGRES_USER: "root"
POSTGRES_PASSWORD: "admin"
POSTGRES_DB: "interactiondb"
PGPORT: 5434
ports:
- "5434:5434"
volumes:
- interaction_db_data:/var/lib/postgresql/data
restart: unless-stopped
interaction_backend:
build:
context: ./interaction-service
dockerfile: Dockerfile
command: uvicorn apps.main:app --host 0.0.0.0 --port 8002
volumes:
- ./interaction-service:/code/
environment:
- DATABASE_URL=postgres://root:admin@interactionpostgres:5434/interactiondb
- SECRET_KEY=8c6bf0f1b38792f53b1eea89cdf30109a1eceba49d2f0258cd50d31ea4562da7
- AUTHENTICATION_VERIFICATION_URL=http://auth_backend:8000/api/v1/auth/verify-token
- REDIS_URL=redis://redis:6379
- POST_SERVICE_URL=http://post_backend:8001
ports:
- 8002:8002
depends_on:
- redis
- auth_backend
- post_backend
- interactionpostgres
restart: always
moderationpostgres:
image: postgres:alpine3.17
environment:
POSTGRES_USER: "root"
POSTGRES_PASSWORD: "admin"
POSTGRES_DB: "moderationdb"
PGPORT: 5435
ports:
- "5435:5435"
volumes:
- moderation_db_data:/var/lib/postgresql/data
restart: unless-stopped
moderation_backend:
build:
context: ./moderation-service
dockerfile: Dockerfile
command: uvicorn apps.main:app --host 0.0.0.0 --port 8003
volumes:
- ./moderation-service:/code/
environment:
- DATABASE_URL=postgres://root:admin@moderationpostgres:5435/moderationdb
- SECRET_KEY=8c6bf0f1b38792f53b1eea89cdf30109a1eceba49d2f0258cd50d31ea4562da7
- AUTHENTICATION_VERIFICATION_URL=http://auth_backend:8000/api/v1/auth/verify-token
- REDIS_URL=redis://redis:6379
ports:
- 8003:8003
depends_on:
- redis
- auth_backend
- post_backend
- interaction_backend
- moderationpostgres
restart: always
engagementpostgres:
image: postgres:alpine3.17
environment:
POSTGRES_USER: "root"
POSTGRES_PASSWORD: "admin"
POSTGRES_DB: "engagementdb"
PGPORT: 5436
ports:
- "5436:5436"
volumes:
- engagement_db_data:/var/lib/postgresql/data
restart: unless-stopped
engagement_backend:
build:
context: ./engagement-service
dockerfile: Dockerfile
command: uvicorn apps.main:app --host 0.0.0.0 --port 8004
volumes:
- ./engagement-service:/code/
environment:
- DATABASE_URL=postgres://root:admin@engagementpostgres:5436/engagementdb
- SECRET_KEY=8c6bf0f1b38792f53b1eea89cdf30109a1eceba49d2f0258cd50d31ea4562da7
- AUTHENTICATION_VERIFICATION_URL=http://auth_backend:8000/api/v1/auth/verify-token
- REDIS_URL=redis://redis:6379
ports:
- 8004:8004
depends_on:
- redis
- auth_backend
- post_backend
- interaction_backend
- moderation_backend
- engagementpostgres
restart: always