Files
dragonsstash/.env.example
adminandClaude Opus 4.8 2e7e6cca9b Backup: switch NAS transport to SMB/CIFS, fix crond/OOM/live-tar defects
Wire the backup service against the Synology share over SMB/CIFS (the NAS
authenticates with a user/password; NFS is IP-allowlist only). Also fixes
three defects found bringing the service up live:

- entrypoint crash-loop: dcron's crond fails "setpgid: Operation not
  permitted" in this runtime -> use busybox crond; make repo-init idempotent
  (check via `restic cat config`, tolerate init-on-existing) so a transient
  CIFS/lock hiccup can't kill PID 1.
- OOM: pg_dump of a ~276MB DB + tar + restic exceeded the 256M cap -> 1G.
- live tar abort: GNU tar exits 1 when TDLib files change mid-read (worker is
  live); per design this is best-effort, so tolerate exit 1, fatal only >=2.

Kuma push is now optional (empty URL disables alerting) since it's deferred.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 11:36:19 +02:00

48 lines
1.6 KiB
Bash

# Database
DATABASE_URL="postgresql://dragons:stash@localhost:5432/dragonsstash?schema=public"
POSTGRES_USER="dragons"
POSTGRES_PASSWORD="stash"
POSTGRES_DB="dragonsstash"
# Auth.js
AUTH_SECRET="generate-with-openssl-rand-base64-32"
AUTH_TRUST_HOST=true
# GitHub OAuth (optional)
AUTH_GITHUB_ID=""
AUTH_GITHUB_SECRET=""
# App
# APP_PORT controls the port the container listens on AND how it is exposed on the host.
# If you change APP_PORT, also update NEXT_PUBLIC_APP_URL to match.
NEXT_PUBLIC_APP_URL="http://localhost:3000"
APP_PORT=3000
# API key for external access to package/ingestion endpoints (optional)
TELEGRAM_API_KEY=""
# Telegram integration (get from https://my.telegram.org/apps)
TELEGRAM_API_ID=""
TELEGRAM_API_HASH=""
# Telegram Bot (create via @BotFather on Telegram)
BOT_TOKEN=""
BOT_USERNAME="" # e.g. "MyDragonsStashBot" — enables deep link in Settings
# Worker (only needed when running worker container)
WORKER_INTERVAL_MINUTES=60
WORKER_TEMP_DIR="/tmp/zips"
TDLIB_STATE_DIR="/data/tdlib"
WORKER_MAX_ZIP_SIZE_MB=4096
MULTIPART_TIMEOUT_HOURS=0
LOG_LEVEL="info"
# Backup (NAS via SMB/CIFS + restic)
NAS_HOST="" # Synology NAS IP or hostname reachable from this host
NAS_SHARE="" # SMB share name, e.g. dragonsstash_backups
NAS_USERNAME="" # SMB user with read/write on the share
NAS_PASSWORD="" # SMB user password (avoid commas — they delimit cifs mount opts)
RESTIC_PASSWORD="" # generate with: openssl rand -base64 32
KUMA_PUSH_URL="" # optional: Uptime Kuma Push monitor URL; leave empty to disable alerting
TZ="Etc/UTC"