diff --git a/Dockerfile b/Dockerfile index 16d9671..175afeb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,30 @@ FROM python:3.12-alpine +# Create app directory WORKDIR /app -COPY requirements.txt /app/ +# Set environment variables +ENV PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 \ + PIP_NO_CACHE_DIR=1 \ + PIP_DISABLE_PIP_VERSION_CHECK=1 + +# Install dependencies first (for better caching) +COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt -COPY . /app/ +# Copy the rest of the application +COPY . . -# Make entrypoint script executable -RUN chmod +x /app/entrypoint.sh +# Make the entrypoint script executable +RUN chmod +x entrypoint.sh -EXPOSE 5000 +# Set correct permissions +RUN chown -R nobody:nobody /app +# Switch to non-root user +USER nobody + +# Set proper signal handling for faster shutdown ENTRYPOINT ["/app/entrypoint.sh"] CMD ["server"] diff --git a/templates/index.html b/templates/index.html index ba86374..db5a850 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7,116 +7,48 @@
Übersicht über alle aktiven Proxy-Server
-