-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
39 lines (37 loc) · 986 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
version: "3"
services:
db:
image: "postgres"
container_name: "portfolio-postgres"
environment:
POSTGRES_DB: "portfolio"
POSTGRES_PASSWORD: "portfolio"
POSTGRES_USER: "portfolio"
POSTGRES_HOST: "0.0.0.0"
ports:
- "5432:5432"
volumes:
- ~/_postgresql_data:/var/lib/postgresql/data
web:
build: ./
image: portfolio
command: bash -c 'python manage.py migrate --settings settings.dev.settings &&
python manage.py runserver --settings settings.dev.settings'
container_name: portfolio
volumes:
- ".:/portfolio:rw"
ports:
- "8000:8000"
depends_on:
- db
extra_hosts:
- "localhost:127.0.0.1"
environment:
DJANGO_DATABASE_NAME: "portfolio"
DJANGO_DATABASE_USER: "portfolio"
DJANGO_DATABASE_PASSWORD: "portfolio"
DJANGO_DATABASE_HOST: "db"
PYTHONUNBUFFERED: "0"
DJANGO_DEBUG_ENABLED: "True"
stdin_open: true
tty: true