initiales bauen mit mistral

This commit is contained in:
Björn Runden committed 2026-08-01 15:40:30 +02:00
1 parent 7e2e8bdf59
commit c74bca1e13
22 files changed
+5642

No files matched your search

+53
View File
@@ -0,0 +1,53 @@
# =============================================================================
# Formeleon - Multi-tenant Form Generator
# Author: Björn Runden <br@runden.net>
# File: Dockerfile
# Description: Docker container configuration for Formeleon application.
# =============================================================================
# Use official Python runtime as parent image
# Use official Python 3.13 runtime as parent image
FROM python:3.13-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
FLASK_ENV=production \
FLASK_APP=app.py
# Set working directory
WORKDIR /app
# Install system dependencies (einschließlich curl für Healthcheck)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements file first to leverage Docker cache
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create uploads directory
RUN mkdir -p /tmp/formeleon_uploads && \
touch /tmp/formeleon_uploads/.gitkeep
# Expose port
EXPOSE 5000
# Health check
HEALTHCHECK --interval=30s --timeout=3s \
CMD curl -f http://localhost:5000/api/v1/status || exit 1
# Run the application with gthread workers for high concurrency
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "4", "--threads", "2", "--worker-class", "gthread", "app:app"]
# For development (uncomment and use docker-compose)
# CMD ["flask", "run", "--host=0.0.0.0", "--port=5000"]