This commit is contained in:
m
2026-03-17 05:40:36 +01:00
parent 4b06f03753
commit 43bec07510
4 changed files with 0 additions and 74 deletions

View File

@@ -1,3 +0,0 @@
http://100.64.0.17 {
reverse_proxy flask_blog:5000
}

View File

@@ -1,25 +0,0 @@
FROM python:3.11-slim
ARG USER_UID=1000
ARG USER_GID=1000
# --build-arg USER_GID= USER_UID=
RUN groupadd -g "${USER_GID}" flaskuser \
&& useradd -u "${USER_UID}" -g "${USER_GID}" flaskuser
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt gunicorn
# Copy the rest of the code
COPY . .
# Change ownership to our non-root user
RUN chown -R flaskuser:flaskuser /app
USER flaskuser
# Run with Gunicorn (replaces uwsgi)
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app", "--workers", "4"]

View File

@@ -1,11 +0,0 @@
#!/bin/bash
cd content
# 1. Save any new comments first
git add comments.csv
git commit -m "chore: save comments before update"
git push origin main
# 2. Now update the whole blog
cd ..
git pull
git submodule update --init --recursive

View File

@@ -1,35 +0,0 @@
services:
flask_app:
build: .
container_name: flask_blog
restart: always
volumes:
- .:/app
- ./data:/app/data # Persist your CSV files
networks:
- web_net
caddy:
image: caddy:latest
container_name: caddy
restart: always
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
networks:
- web_net
depends_on:
- flask_app
networks:
web_net:
driver: bridge
volumes:
caddy_data:
caddy_config: