-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
33 lines (32 loc) · 844 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
33 lines (32 loc) · 844 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
version: "3"
services:
db:
image: postgres
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=circlepen
ports:
- "5432:5432"
app:
restart: always
build: ./backend
# command: bash -c "cd schedule && python3 manage.py crontab add && python3 manage.py makemigrations && python3 manage.py migrate && python3 manage.py runserver 0.0.0.0:80"
command:
- /bin/sh
- -c
- |
python3 manage.py collectstatic --noinput
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py runserver 0.0.0.0:8000
container_name: web
volumes:
- .:/code
- ./backend:/code/backend
ports:
- "8000:8000"
depends_on:
- db