-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
32 lines (30 loc) · 948 Bytes
/
docker-compose.yml
File metadata and controls
32 lines (30 loc) · 948 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
version: "3"
services:
db:
image: postgres:11.5-alpine
volumes:
- $PWD/data/pg_data:/var/lib/postgresql/data:cached
- $PWD/data/db_dumps:/db_dumps
environment:
POSTGRES_USER: django_tutorial_db
app:
build:
context: python-django-tutorial
dockerfile: Dockerfile
restart: on-failure
depends_on:
- db
ports:
- 8000:8000
- 8001:8001
volumes:
- ./python-django-tutorial:/app:delegated
- /app/python_django_tutorial/python_django_tutorial.egg-info
- $PWD/data/web_project_media:/venv/var/web_project/media:cached
- $PWD/data/bash_history:/root/.bash_history:cached
command: django-admin runserver 0.0.0.0:8000
environment:
DATABASE_URL: postgres://django_tutorial_db:postgres@db:5432/django_tutorial_db
DJANGO_SETTINGS_MODULE: web_project.settings
STATIC_ROOT: /venv/var/web_project/media
env_file: .docker-env