CI and images / lint (push) Successful in 2s
CI and images / extension-version (push) Successful in 1s
CI and images / extension-test (push) Successful in 17s
CI and images / frontend-build (push) Successful in 19s
CI and images / backend-lint-and-test (push) Successful in 45s
CI and images / integration (push) Failing after 2m26s
CI and images / sign-extension (push) Skipped
CI and images / build-web (push) Skipped
CI and images / smoke-web (push) Skipped
CI and images / promote (push) Skipped
CI and images / refresh-dev (push) Skipped
CI and images / unattended-failure (push) Skipped
CI and images / build-agent (push) Skipped
Settings → Maintenance → Backups gains "Restore from the bucket": pick one of the bucket's dated dumps, type its confirmation, and FabledCurator saves the current database to the bucket, replaces it with the dump, migrates it to this version, then fetches every image and attachment back to the path its row records. Each file is checked against its sha256 on arrival and moved into place only then; a file already on disk is left alone, so "Fetch missing files" repairs a library that lost files without touching the database. - services/backup_restore.py: list/find/fetch dumps, migrate, keep this install's destination (the dump's sealed secret can't be opened here), library_files work list, restore_file (one fetch per sha, copies for duplicate paths, refuses paths outside /images). - restore_offsite_task: the database phase, then 45-minute file chunks with a heartbeat; a failed load leaves an empty migrated database and says why. The dump's own run row is marked ok, other runs then going "Interrupted". - backup_s3.get_file: sha/size check on arrival, ObjectMissing for a 404, download pacing. - backup_service: every dump leaves the credential table's rows out; restore_db reports pg_restore's last line, stops at the first error, ends other connections and waits at most 60 s for locks. - Backups and orphan repair wait while a restore runs; the stall sweep judges restores by heartbeat; restore runs are pruned to 20. - CLI: python -m backend.app.scripts.restore list|database|files. - README: backup and restore section; logins are in no backup. - Tests: a round trip through an in-process S3 bucket (tests/fake_s3.py) with real pg_dump/pg_restore, plus file, run, API and get_file cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
103 lines
4.4 KiB
Bash
103 lines
4.4 KiB
Bash
# FabledCurator configuration.
|
|
#
|
|
# Copy to `.env` and edit before your first production start:
|
|
#
|
|
# cp .env.example .env
|
|
#
|
|
# Only the two values under CHANGE THESE actually need your attention. The
|
|
# rest have working defaults baked into docker-compose.yml and are listed
|
|
# here so you know they exist, not because you have to set them.
|
|
#
|
|
# Almost nothing else lives here on purpose. FabledCurator is configured from
|
|
# its own Settings UI, backed by the database — no restart, no YAML. If you
|
|
# are looking for where to set an import path, a download schedule or an ML
|
|
# threshold, it is in the app, not in this file.
|
|
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# CHANGE THESE
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# The Postgres password. docker-compose.yml falls back to a published default
|
|
# (`fabledcurator_dev`) so that `docker compose up` works with no config at
|
|
# all — which is exactly why you must not leave it at that on a real install.
|
|
# It is the credential protecting your stored platform session cookies.
|
|
DB_PASSWORD=
|
|
|
|
# Sets Quart's app.secret_key. Today it signs nothing: FabledCurator has no
|
|
# login and uses no session cookies, so no value here is protecting anything
|
|
# right now. Set it anyway. It is required at boot rather than defaulted so
|
|
# that the day something session-backed does land, no instance is already
|
|
# running on a value published in this file.
|
|
#
|
|
# openssl rand -hex 32
|
|
SECRET_KEY=
|
|
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# FIRST BOOT ONLY — then delete this line
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# FabledCurator encrypts your stored platform credentials with a Fernet key it
|
|
# keeps at /images/secrets/credential_key.b64 — inside the ./images bind mount,
|
|
# so it outlives the container. On a brand-new install that file does not exist
|
|
# yet, and the app REFUSES TO START rather than quietly create one:
|
|
#
|
|
# MissingCredentialKey: Fernet key file not found at
|
|
# /images/secrets/credential_key.b64
|
|
#
|
|
# That refusal is deliberate. Auto-creating a key is indistinguishable from the
|
|
# disaster case — a restore that brought the database back but lost
|
|
# ./images/secrets — and there it would mint a key that cannot decrypt anything,
|
|
# leaving an instance that looks healthy while every paywalled download fails.
|
|
# So the choice is yours to make explicitly, once.
|
|
#
|
|
# Set this for your first `up`, watch the container come up, then DELETE THE
|
|
# LINE. Leaving it set disarms the protection permanently, on an instance that
|
|
# by then has credentials worth protecting.
|
|
#
|
|
# Backups leave the key and the stored logins out on purpose: after restoring
|
|
# onto a new install, sign in to each account again.
|
|
CURATOR_BOOTSTRAP_NEW_KEY=1
|
|
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Optional — defaults are fine
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# Host port the UI is published on. The container always listens on 8080;
|
|
# this is only the left-hand side of the port mapping.
|
|
PORT=8080
|
|
|
|
# DEBUG | INFO | WARNING | ERROR
|
|
LOG_LEVEL=INFO
|
|
|
|
# Postgres identity. Change these only if you are pointing at a database you
|
|
# manage yourself — the bundled postgres service is created with whatever is
|
|
# set here, so changing them after the first start will not rename anything.
|
|
DB_USER=fabledcurator
|
|
DB_NAME=fabledcurator
|
|
|
|
# Set by docker-compose.yml to reach the bundled services. Override only when
|
|
# running Postgres or Redis outside this stack.
|
|
# DB_HOST=postgres
|
|
# DB_PORT=5432
|
|
# CELERY_BROKER_URL=redis://redis:6379/0
|
|
# CELERY_RESULT_BACKEND=redis://redis:6379/0
|
|
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# There is no authentication variable here, and that is not an omission
|
|
# ---------------------------------------------------------------------------
|
|
#
|
|
# FabledCurator has no login, no accounts and no permission model. Anything
|
|
# that can reach PORT is an administrator and can read the platform session
|
|
# cookies the app stores for Patreon and SubscribeStar.
|
|
#
|
|
# Bind it to a trusted network. See "Before you expose it" in README.md and
|
|
# the deployment posture section of SECURITY.md.
|
|
#
|
|
# The Firefox extension's API key is NOT configured here — it is generated
|
|
# automatically on first use and shown under Settings → Maintenance, where you
|
|
# can also rotate it.
|