mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2024-11-17 04:09:25 +08:00
24 lines
617 B
YAML
24 lines
617 B
YAML
version: "3.9"
|
|
|
|
services:
|
|
# Django App
|
|
django_backend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: test_backend:latest
|
|
ports:
|
|
- "8092:8000"
|
|
environment:
|
|
- PYTHONBUFFERED=1
|
|
command:
|
|
[
|
|
"sh",
|
|
"-c",
|
|
"python backend/manage.py spectacular --color --file backend/schema.yml && python backend/manage.py collectstatic --noinput && python backend/manage.py makemigrations && python backend/manage.py migrate && python backend/manage.py runserver 127.0.0.1:8000",
|
|
]
|
|
volumes:
|
|
- .:/code # For hotreloading
|
|
|
|
volumes:
|
|
test_backend:
|