forked from FGA-GCES/Trabalho-Individual-2022-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
55 lines (49 loc) · 970 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
45
46
47
48
49
50
51
52
53
54
55
version: '3.0'
services:
db:
container_name: db
image: postgres:latest
volumes:
- /var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_USER=postgres
- POSTGRES_DB=library_db
ports:
- 5432:5432
backend:
container_name: backend
build:
context: library_back/
dockerfile: Dockerfile
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./library_back:/code
ports:
- 8000:8000
depends_on:
- db
frontend:
container_name: frontend
build:
context: library_front/
dockerfile: Dockerfile
volumes:
- ./library_front:/app
ports:
- 3000:3000
depends_on:
- backend
- db
command: npm start
nginx:
build:
context: nginx/
dockerfile: Dockerfile
restart: always
ports:
- 8080:8080
depends_on:
- db
- backend
- frontend