-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (47 loc) · 1.04 KB
/
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
45
46
47
48
49
50
51
52
version: '3.7'
services:
nginx:
image: nginx:1.17
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- 8000:80
depends_on:
- backend
- frontend
postgres:
image: postgres:12
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- '5432:5432'
volumes:
- db-data:/var/lib/postgresql/data:cached
backend:
build:
context: backend
dockerfile: Dockerfile
command: python app/main.py
tty: true
volumes:
- ./backend:/app/:cached
- ./.docker/.ipython:/root/.ipython:cached
environment:
PYTHONPATH: .
DATABASE_URL: 'postgresql://postgres:password@postgres:5432/postgres'
depends_on:
- "postgres"
frontend:
build:
context: frontend
dockerfile: Dockerfile
stdin_open: true
volumes:
- './frontend:/app:cached'
- './frontend/node_modules:/app/node_modules:cached'
environment:
- NODE_ENV=development
volumes:
db-data: