-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (62 loc) · 1.51 KB
/
docker-compose.yml
File metadata and controls
65 lines (62 loc) · 1.51 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
version: '3.8'
services:
postgres:
container_name: postgres
image: postgres:12
environment:
- POSTGRES_DB=${APP_DB_NAME}
- POSTGRES_USER=${APP_DB_USER}
- POSTGRES_PASSWORD=${APP_DB_PASSWORD}
- POSTGRES_INITDB_ARGS=--encoding=UTF-8
expose:
- 5432
ports:
- 5432:5432
restart: always
volumes:
- ./backend/postgres/pgdata/data:/var/lib/postgresql/data
django:
container_name: django
build:
context: .
dockerfile: ./backend/django/Dockerfile
environment:
- DJANGO_DEBUG=True
- DJANGO_DB_HOST=postgres
- DJANGO_DB_PORT=5432
- DJANGO_DB_NAME=${APP_DB_NAME}
- DJANGO_DB_USERNAME=${APP_DB_USER}
- DJANGO_DB_PASSWORD=${APP_DB_PASSWORD}
- DJANGO_SECRET_KEY=${APP_SECRET_KEY}
expose:
- 8000
ports:
- 8000:8000
restart: always
volumes:
- ./backend/django:/app
- ./backend/nginx/web/media:/media
depends_on:
- postgres
react:
stdin_open: true
container_name: react
build:
context: .
dockerfile: ./frontend/react/Dockerfile
environment:
- CHOKIDAR_USEPOLLING=true
- REACT_APP_WEB_URL=${APP_WEB_PREFIX}:3000
- REACT_APP_API_URL=${APP_WEB_PREFIX}:8000
- REACT_APP_MEDIA_URL=${APP_WEB_PREFIX}:8000
- REACT_APP_TOKEN_NAME=ProjectReactToken
expose:
- 3000
ports:
- 3000:3000
restart: always
volumes:
- ./frontend/react:/app
- /app/node_modules
depends_on:
- django