feat: add initial django scouting domain models baseline

This commit is contained in:
2026-04-06 19:07:53 +02:00
parent 2994089f1e
commit d5b00eee98
16 changed files with 540 additions and 0 deletions

35
infra/docker-compose.yml Normal file
View File

@ -0,0 +1,35 @@
services:
db:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
app:
build:
context: ..
dockerfile: infra/docker/Dockerfile
working_dir: /app
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ../app:/app
environment:
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
DJANGO_DEBUG: ${DJANGO_DEBUG}
DJANGO_ALLOWED_HOSTS: ${DJANGO_ALLOWED_HOSTS}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PORT: ${POSTGRES_PORT}
ports:
- "8000:8000"
depends_on:
- db
volumes:
postgres_data:

13
infra/docker/Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
COPY app/requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
COPY app/ /app/
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]