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
+1 -2
View File
@@ -1,6 +1,6 @@
services:
sofa:
image: ghcr.io/jakejarvis/sofa:latest
image: ghcr.io/jakejarvis/sofa:edge
container_name: sofa
restart: unless-stopped
ports:
@@ -8,7 +8,6 @@ services:
volumes:
- sofa-data:/data
environment:
- DATABASE_URL=file:/data/sqlite.db
- TMDB_API_READ_ACCESS_TOKEN=${TMDB_API_READ_ACCESS_TOKEN}
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}
- BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:3000}