Convert to Flask app with password-protected admin panel
Links now live in data/links.json instead of hardcoded HTML, editable via /admin (add/rename/reorder/delete sections and links, per-link color and half-width side-by-side layout). New pages can be added without code changes. Docker image only needs rebuilding on code changes now, not on content changes (data/ is volume-mounted). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
56dc37843a
commit
61c4701115
13 files changed
+797
-173
No files matched your search
+12
-7
@@ -1,16 +1,21 @@
|
||||
# Use the official Python image
|
||||
FROM python:3.12-slim
|
||||
FROM python:3.14-slim
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the HTML files into the container
|
||||
COPY index.html /app
|
||||
COPY honey.html /app
|
||||
COPY styles.css /app
|
||||
# Install dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy the application into the container
|
||||
COPY app.py .
|
||||
COPY templates/ templates/
|
||||
COPY static/ static/
|
||||
COPY data/ data/
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Start the Python HTTP server on port 80
|
||||
CMD ["python3", "-m", "http.server", "80"]^
|
||||
# Start the app via a production WSGI server
|
||||
CMD ["waitress-serve", "--host=0.0.0.0", "--port=80", "app:app"]
|
||||
Reference in new issue
Block a user