Introduce DATA_DIR env var for consistent data path configuration

Replace separate DATABASE_URL and IMAGE_CACHE_DIR env vars with a
single DATA_DIR root (default: ./data, Docker: /data). DATABASE_URL
and CACHE_DIR are derived from it but can still be overridden
individually.

Also:
- Pin pnpm to @10 for reproducible Docker builds
- Add --link to COPY instructions for better BuildKit cache reuse
- Add syntax directive for BuildKit features
- Simplify Dockerfile mkdir to just /data (ensureImageDirs handles subdirs)
- Remove redundant DATABASE_URL from docker-compose.yml

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 14:26:08 -05:00
co-authored by Claude Opus 4.6
parent fb785645f8
commit ed6e061436
7 changed files with 28 additions and 20 deletions
+5 -7
View File
@@ -1,10 +1,10 @@
# ─── Database ───────────────────────────────────────────────────────────
# SQLite database URL (Docker: file:/data/sqlite.db, local dev: file:sqlite.db)
# DATABASE_URL=file:/data/sqlite.db
# ─── Data Directory ──────────────────────────────────────────────────────
# Root directory for SQLite database and image cache (default: ./data, Docker: /data)
# DATA_DIR=./data
# ─── TMDB (required) ───────────────────────────────────────────────────────
# API Read Access Token — get one at https://www.themoviedb.org/settings/api
TMDB_API_READ_ACCESS_TOKEN=your_tmdb_api_read_access_token_here
TMDB_API_READ_ACCESS_TOKEN=
# Optional: override TMDB base URLs (advanced)
# TMDB_API_BASE_URL=https://api.themoviedb.org/3
@@ -13,7 +13,7 @@ TMDB_API_READ_ACCESS_TOKEN=your_tmdb_api_read_access_token_here
# ─── Auth (required) ───────────────────────────────────────────────────────
# Random secret for session encryption (min 32 chars)
# Generate one with `npx @better-auth/cli secret` or `openssl rand -base64 32`
BETTER_AUTH_SECRET=your_secret_here
BETTER_AUTH_SECRET=
# Public URL of your instance, especially important if reverse proxy is used
BETTER_AUTH_URL=http://localhost:3000
@@ -28,7 +28,5 @@ BETTER_AUTH_URL=http://localhost:3000
# DISABLE_PASSWORD_LOGIN=false # Set to "true" to hide email/password form when OIDC is configured
# ─── Image Caching ─────────────────────────────────────────────────────
# Downloads TMDB images to local disk for faster serving (default: /data/images)
# IMAGE_CACHE_DIR=/data/images
# Set IMAGE_CACHE_ENABLED to "false" to use TMDB CDN directly (default: enabled)
# IMAGE_CACHE_ENABLED=true