first commit

This commit is contained in:
Stefan Hacker
2026-02-02 09:46:35 +01:00
commit 6901dc369b
98 changed files with 13030 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
FROM python:3.11-slim
WORKDIR /server
# Install system dependencies including Easy-RSA for certificate generation
RUN apt-get update && apt-get install -y \
gcc \
libmariadb-dev \
pkg-config \
iptables \
easy-rsa \
&& rm -rf /var/lib/apt/lists/* \
&& ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin/easyrsa
# Copy requirements first for better caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code as package
COPY app/ /server/app/
# Create non-root user
RUN useradd -m -u 1000 appuser
# Note: Running as root for iptables access, but API endpoints are protected
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]