Add phase 6: backup/restore scripts and full README
- backup.sh: pg_dump (custom format), media volume and .env in one archive with retention (KEEP), cron example - restore.sh: confirmation, restores .env if missing, pg_restore --clean in one transaction, replaces media, restarts the app - Fix: MEDIA_ROOT=/data/media in the image so photos land on the volume - README: installation, Nginx/Cloudflare client-IP setup, configuration table, AI and Instagram notes, update, backup, troubleshooting, security - Test settings independent of the local .env Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
60785e2437
commit
f96cbe965e
+3
-2
@@ -3,7 +3,8 @@ FROM python:3.12-slim AS base
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
||||
MEDIA_ROOT=/data/media
|
||||
|
||||
RUN groupadd --system --gid 1000 app \
|
||||
&& useradd --system --uid 1000 --gid app --home /app app
|
||||
@@ -30,6 +31,6 @@ COPY requirements-dev.txt .
|
||||
RUN pip install -r requirements-dev.txt
|
||||
USER app
|
||||
ENTRYPOINT []
|
||||
CMD ["pytest"]
|
||||
CMD ["pytest", "-p", "no:cacheprovider"]
|
||||
|
||||
FROM base AS production
|
||||
|
||||
Reference in New Issue
Block a user