-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
44 lines (41 loc) · 885 Bytes
/
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
services:
backend:
container_name: backend_django
build:
context: ./backend
dockerfile: ../docker/django/Dockerfile
env_file:
- .env
volumes:
- media_data:/vol/media
restart: always
depends_on:
- postgres
proxy:
container_name: nginx
build:
context: ./frontend
dockerfile: ../docker/react/Dockerfile
volumes:
- ./backend/staticfiles:/vol/staticfiles
- media_data:/vol/media
restart: always
ports:
- 80:80
depends_on:
- backend
postgres:
container_name: postgres_db
image: postgres:15
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
restart: always
ports:
- "5432:5432"
volumes:
media_data:
postgres_data: