forked from yandex-praktikum/taski-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.production.yml
More file actions
33 lines (31 loc) · 947 Bytes
/
docker-compose.production.yml
File metadata and controls
33 lines (31 loc) · 947 Bytes
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
# docker-compose.production.yml
volumes:
pg_data_production:
static_volume:
# Всё отличие — заменяем build на image и указываем, какой образ использовать
services:
db:
image: postgres:13.10
env_file: .env
volumes:
- pg_data_production:/var/lib/postgresql/data
backend:
image: hawkxdev/taski_backend # Качаем с Docker Hub
env_file: .env
volumes:
- static_volume:/backend_static
frontend:
image: hawkxdev/taski_frontend # Качаем с Docker Hub
env_file: .env
command: >
sh -c "cp /app/build/*.* /frontend_static/ 2>/dev/null || true &&
cp -r /app/build/static/* /frontend_static/"
volumes:
- static_volume:/frontend_static
gateway:
image: hawkxdev/taski_gateway # Качаем с Docker Hub
env_file: .env
volumes:
- static_volume:/staticfiles/
ports:
- 8000:80