-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (39 loc) · 1009 Bytes
/
docker-compose.yml
File metadata and controls
41 lines (39 loc) · 1009 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
40
41
services:
web:
build: /Backend
container_name: django_app
command: >
sh -c "
python manage.py makemigrations &&
python manage.py migrate &&
python manage.py test --noinput &&
python manage.py createadmin &&
python manage.py loadexampledata &&
python manage.py runserver 0.0.0.0:8000"
volumes:
- ./Backend/media:/media
ports:
- "8000:8000"
depends_on:
- db
environment:
- POSTGRES_NAME=django_db
- POSTGRES_USER=django_user
- POSTGRES_PASSWORD=django_password
- POSTGRES_HOST=db
- ADMIN_USER=admin_user
- ADMIN_EMAIL=admin@gmail.com
- ADMIN_PASSWORD=secure_password
db:
image: postgres:13
container_name: postgres_db
environment:
POSTGRES_DB: django_db
POSTGRES_USER: django_user
POSTGRES_PASSWORD: django_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data: