Files
Journal/Dockerfile
SimolZimol 0e7efe4b74 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
2026-08-02 20:41:24 +02:00

34 lines
896 B
Docker

# 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"]