-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
228 lines (215 loc) · 4.72 KB
/
docker-compose.prod.yml
File metadata and controls
228 lines (215 loc) · 4.72 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
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
version: "3.8"
services:
api-auth:
build:
context: ./
dockerfile: ./api-auth/Dockerfile
env_file:
- ./.env
- ./client/.env
- ./api-auth/.env
- ./postgres/.env
- ./redis/.env
depends_on:
- postgres
- redis
restart: unless-stopped
links:
- postgres
- redis
ports:
- "${API_AUTH_GRPC_PORT}:${API_AUTH_GRPC_PORT}"
- "${API_AUTH_GRPC_GATEWAY_PORT}:${API_AUTH_GRPC_GATEWAY_PORT}"
- "${API_AUTH_HTTP_PORT}:${API_AUTH_HTTP_PORT}"
api-user:
build:
context: ./
dockerfile: ./api-user/Dockerfile
env_file:
- ./api-user/.env
- ./postgres/.env
- ./redis/.env
depends_on:
- postgres
- redis
restart: unless-stopped
links:
- postgres
- redis
ports:
- "${API_USER_GRPC_PORT}:${API_USER_GRPC_PORT}"
- "${API_USER_GRPC_GATEWAY_PORT}:${API_USER_GRPC_GATEWAY_PORT}"
# access to the server:
# $> docker-compose exec server sh
api-picture:
build:
context: ./api-picture
dockerfile: ./Dockerfile
env_file:
- ./.env
- ./postgres/.env
- ./redis/.env
- ./client/.env
- ./api-picture/.env
volumes:
- picture-data:/app/storage
depends_on:
- postgres
- redis
restart: unless-stopped
links:
- client
- postgres
- redis
ports:
- "${API_PICTURE_PORT}:${API_PICTURE_PORT}"
api-scrapper:
build:
context: ./
dockerfile: ./api-scrapper/Dockerfile
env_file:
- ./api-scrapper/.env
- ./postgres/.env
depends_on:
- postgres
restart: unless-stopped
links:
- postgres
ports:
- "${API_SCRAPPER_GRPC_PORT}:${API_SCRAPPER_GRPC_PORT}"
api-media:
build:
context: ./
dockerfile: ./api-media/Dockerfile
env_file:
- ./api-scrapper/.env
- ./api-media/.env
- ./postgres/.env
- ./redis/.env
volumes:
- streaming-data:/app/.cache
depends_on:
- postgres
- api-scrapper
- redis
restart: unless-stopped
links:
- postgres
- api-scrapper
- redis
ports:
- "${API_MEDIA_GRPC_PORT}:${API_MEDIA_GRPC_PORT}"
- "${API_MEDIA_GRPC_GATEWAY_PORT}:${API_MEDIA_GRPC_GATEWAY_PORT}"
api-streaming:
build: ./api-streaming
env_file:
- ./.env
- ./postgres/.env
- ./redis/.env
- ./client/.env
- ./api-streaming/.env
depends_on:
- postgres
restart: unless-stopped
links:
- postgres
ports:
- "${API_STREAMING_PORT}:${API_STREAMING_PORT}"
api-position:
build: ./api-position
env_file:
- ./.env
- ./postgres/.env
- ./redis/.env
- ./client/.env
- ./api-position/.env
depends_on:
- postgres
- redis
restart: unless-stopped
links:
- postgres
- redis
ports:
- "${API_POSITION_PORT}:${API_POSITION_PORT}"
postgres:
image: postgres:14.4-alpine
restart: unless-stopped
env_file:
- ./postgres/.env
ports:
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
# access to the psql CLI:
# $> docker-compose exec postgres psql
redis:
image: redis:7.0.2-alpine
restart: unless-stopped
command: --port ${REDIS_PORT}
env_file:
- ./redis/.env
volumes:
- redis-data:/data
ports:
- "${REDIS_PORT}:${REDIS_PORT}"
# access to the redis CLI:
# $> dc exec -it redis /bin/sh -c 'redis-cli -h redis'
adminer:
image: adminer:4.8.1-standalone
restart: unless-stopped
depends_on:
- postgres
ports:
- 5050:8080
links:
- postgres
tmdb-proxy:
image: nginx:1.23-alpine
restart: unless-stopped
env_file:
- ./tmdb-proxy/.env
volumes:
- ./tmdb-proxy/nginx.conf:/etc/nginx/nginx.conf:ro
- nginx-proxy-data:/var/www/cache
ports:
- "${TMDB_PROXY_PORT}:80"
client:
build:
context: ./client
dockerfile: ./Dockerfile
env_file:
- ./.env
- ./api-auth/.env
- ./api-user/.env
- ./api-media/.env
- ./api-streaming/.env
- ./tmdb-proxy/.env
- ./client/.env
depends_on:
- api-auth
- api-user
- api-media
- api-streaming
- api-position
links:
- api-auth
- api-media
- api-streaming
- api-position
- tmdb-proxy
ports:
- "${CLIENT_PORT}:3000"
restart: unless-stopped
volumes:
postgres-data:
driver: local
redis-data:
driver: local
nginx-proxy-data:
driver: local
streaming-data:
driver: local
picture-data:
driver: local