new file: .env.example
new file: .gitignore new file: Dockerfile new file: README.md new file: app.py new file: auth.py new file: config.py new file: db.py new file: db_helpers.py new file: docker-compose.yml new file: requirements.txt new file: routes/__init__.py new file: routes/admin_routes.py new file: routes/auth_routes.py new file: routes/journal_routes.py new file: static/css/style.css new file: static/js/main.js new file: templates/admin/dashboard.html new file: templates/admin/users.html new file: templates/base.html new file: templates/day.html new file: templates/future.html new file: templates/index.html new file: templates/login.html new file: templates/week.html
This commit is contained in:
33
Dockerfile
Normal file
33
Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
# Basis-Image mit Python
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Arbeitsverzeichnis erstellen
|
||||
WORKDIR /app
|
||||
|
||||
# Kopiere die requirements-Datei und installiere die Abhängigkeiten
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Kopiere den gesamten Projektinhalt in das Arbeitsverzeichnis
|
||||
COPY . .
|
||||
|
||||
# Umgebungsvariablen von Coolify / docker-compose übernehmen (zur Laufzeit)
|
||||
ENV DB_HOST=$DB_HOST
|
||||
ENV DB_PORT=$DB_PORT
|
||||
ENV DB_USER=$DB_USER
|
||||
ENV DB_PASSWORD=$DB_PASSWORD
|
||||
ENV DB_DATABASE=$DB_DATABASE
|
||||
ENV SECRET_KEY=$SECRET_KEY
|
||||
ENV PEPPER=$PEPPER
|
||||
ENV ADMIN_USERNAME=$ADMIN_USERNAME
|
||||
ENV ADMIN_PASSWORD=$ADMIN_PASSWORD
|
||||
|
||||
# Nicht-root Benutzer aus Sicherheitsgründen
|
||||
RUN useradd --create-home appuser && chown -R appuser:appuser /app
|
||||
USER appuser
|
||||
|
||||
# Port für Gunicorn
|
||||
EXPOSE 8000
|
||||
|
||||
# Startbefehl (Production: Gunicorn)
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "4", "app:app"]
|
||||
Reference in New Issue
Block a user