-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (39 loc) · 863 Bytes
/
docker-compose.yml
File metadata and controls
43 lines (39 loc) · 863 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
version: "3.9"
services:
db:
image: postgres:14.5
volumes:
- ./pgdata:/var/lib/postgresql/data
environment:
- POSTGRES_DB=url_shortener
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
container_name: db
backend:
build:
context: ./backend
command: >
sh -c "python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
environment:
- DB_NAME=url_shortener
- DB_USER=postgres
- DB_PASSWORD=postgres
volumes:
- ./backend:/code
ports:
- "8000:8000"
container_name: backend
depends_on:
- db
frontend:
build:
context: ./frontend
ports:
- "3000:3000"
container_name: frontend
command: npm start
stdin_open: true
volumes:
- /app/node_modules
- ./frontend:/app