From 6e9cea9ba425c16b748433bde7f04797843eb18c Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 24 Mar 2025 19:30:00 +0100 Subject: [PATCH] wip --- Dockerfile | 24 ++++- templates/index.html | 234 ++++++++++++++++--------------------------- 2 files changed, 106 insertions(+), 152 deletions(-) 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 @@ Caddy Dashboard - - -
-
-

Caddy Dashboard

-

Übersicht über alle aktiven Proxy-Server

-
- +
+
+ + +
+
+
+ + +
- +
+ Drücke / zum Öffnen, ESC zum Schließen +
+
-
-
- -
- +
{% for server, entries in proxies.items() %} -
-
+
+
-

{{ server }}

-

- Zuletzt aktualisiert: {{ timestamps[server] }} -

+

{{ server }}

+

Zuletzt aktualisiert: {{ timestamps[server] }}

-
-
+
{% for domain, target in entries.items() %} -
- -