Phase 0: Django-Grundgerüst, Docker und Konzept v0.2
- Django 5.2 LTS mit Apps inventar, topologie, export, scanner - Konfiguration über .env (Vorlage .env.example), SQLite in data/ - Login und geschützte Startseite mit Bootstrap 5 (lokal) - Dockerfile, docker-compose.yml, Entrypoint (migrate, collectstatic) - README/AUFBAUPLAN: offene Punkte 1, 2, 4, 7 geklärt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4473523aab
commit
15b6ba2bde
46 files changed
+507
-15
No files matched your search
+23
@@ -0,0 +1,23 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
DJANGO_DATA_DIR=/data
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
# Eigener Benutzer statt root; /data wird als Volume eingehängt
|
||||
RUN useradd --system --create-home --uid 1000 planer \
|
||||
&& mkdir -p /data \
|
||||
&& chown -R planer:planer /app /data
|
||||
USER planer
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["./docker-entrypoint.sh"]
|
||||
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:8000", "--workers", "2"]
|
||||
Reference in new issue
Block a user