-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (32 loc) · 925 Bytes
/
docker-compose.yml
File metadata and controls
41 lines (32 loc) · 925 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
version: "3"
services:
app:
build: .
ports:
- "8000:8000"
volumes:
- .:/app
command: >
sh -c "python /app/manage.py makemigrations &&
python /app/manage.py migrate &&
python /app/manage.py runserver 0.0.0.0:8000"
environment:
- DB_HOST=db
- DB_NAME=postgres
- DB_USER=postgres
- DB_PASS=admin
- DB_PORT=5432
depends_on:
- db
db:
image: postgres:10-alpine
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=admin
- PGDATA=/tmp
ports:
- 5432
volumes:
- "./pgdata:/var/lib/postgresql/data/pgdata"
# - ./init.sql:/docker-entrypoint-initdb.d/init.sql