-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
47 lines (44 loc) · 1004 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
version: '3'
networks:
development:
services:
database:
image: postgres:13.1-alpine
container_name: nishauridb
restart: unless-stopped
tty: true
ports:
- 5432:5432
environment:
- POSTGRES_USER=test
- POSTGRES_PASSWORD=test123
- POSTGRES_DB=nishauri
volumes:
- ../scripts/nishauri.sql:/docker-entrypoint-initdb.d/nishauri.sql
networks:
- development
python:
build:
context: .
dockerfile: python.dockerfile
container_name: nishauri-api
volumes:
- .:/project
depends_on:
- database
ports:
- "8100:8000"
networks:
- development
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8100/"]
command:
- /bin/bash
- -c
- |
sleep 10
python manage.py makemigrations --merge
sleep 10
python manage.py migrate --noinput
sleep 10
python manage.py runserver 0.0.0.0:8000