-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (34 loc) · 828 Bytes
/
docker-compose.yml
File metadata and controls
36 lines (34 loc) · 828 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
version: "3.8"
services:
web:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
volumes:
- .:/app
- ./htmlcov:/app/htmlcov
depends_on:
- db
command: >
sh -c "python manage.py migrate &&
python manage.py loaddata initial_data.json &&
python manage.py runserver 0.0.0.0:8000"
sh -c "coverage run --source='.' manage.py test &&
coverage report &&
coverage html"
environment:
DB_NAME: django_db
DB_USER: django_user
DB_PASSWORD: django_password
DB_HOST: db
DB_PORT: 5432
db:
image: postgres:15
environment:
POSTGRES_USER: django_user
POSTGRES_PASSWORD: django_password
POSTGRES_DB: django_db
ports:
- "5432:5432"