-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yml
48 lines (44 loc) · 1.18 KB
/
docker-compose-prod.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
version: '3'
services:
db:
image: "postgres:12"
env_file:
- .env
environment:
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "${POSTGRES_DB}"
backend:
build: ./backend/
working_dir: /backend/
env_file:
- .env
volumes:
- ./backend:/backend
- backend-media:/backend/media
depends_on:
- "db"
environment:
DEV: 0
SECRET_KEY: "${SECRET_KEY}"
frontend:
build:
context: .
dockerfile: ./frontend/prod.Dockerfile
volumes:
- ./frontend:/frontend
- frontend-static:/usr/src/app/dist/gdzieJedzonko
nginx:
image: nginx:1.17.4-alpine
ports:
- ${PORT:-80}:80 # default port for all
volumes:
- ./nginx/nginx-proxy-prod.conf:/etc/nginx/conf.d/default.conf:ro
- frontend-static:/var/www/frontend/
- backend-media:/var/www/media/
depends_on:
- backend
- frontend
volumes:
frontend-static:
backend-media: