2023-12-03 00:08:10 +08:00
|
|
|
version: "3.9"
|
|
|
|
|
|
|
|
services:
|
|
|
|
# Django App
|
|
|
|
django_backend:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
image: equipmenttracker_backend:latest
|
|
|
|
ports:
|
|
|
|
- "8094:8000" # Expose port 8094 for the web server
|
|
|
|
environment:
|
|
|
|
- PYTHONBUFFERED=1
|
|
|
|
command:
|
|
|
|
[
|
|
|
|
"sh",
|
|
|
|
"-c",
|
2023-12-03 01:00:10 +08:00
|
|
|
"python equipment_tracker/manage.py spectacular --color --file equipment_tracker/schema.yml && python equipment_tracker/manage.py collectstatic --noinput && python equipment_tracker/manage.py makemigrations && python equipment_tracker/manage.py migrate && python equipment_tracker/manage.py runserver 0.0.0.0:8000",
|
2023-12-03 00:08:10 +08:00
|
|
|
]
|
|
|
|
volumes:
|
|
|
|
- .:/code # For hotreloading
|
|
|
|
volumes:
|
|
|
|
equipment_tracker:
|