-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (46 loc) · 949 Bytes
/
docker-compose.yml
File metadata and controls
47 lines (46 loc) · 949 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
version: '3.8'
services:
db:
image: postgres:13.0-alpine
container_name: db
restart: always
env_file:
- '.env'
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
expose:
- "5432"
volumes:
- postgres_data:/var/lib/postgresql/data/
web:
build: ./backend
restart: always
ports:
- 8000:8000
depends_on:
- react
volumes:
- ./backend/media:/backend/media
- ./backend/staticfiles:/backend/staticfiles
env_file:
- '.env'
react:
build: ./frontend
restart: always
container_name: react
ports:
- 8080:80
env_file:
- './frontend/.env'
depends_on:
- db
volumes:
- ./backend/staticfiles:/admin_static
- ./frontend/node_modules:/frontend/node_modules
volumes:
postgres_data:
media:
staticfiles:
node_modules: