Commit graph

32 commits

Author SHA1 Message Date
SergeantPanda
8f060e8b3a feat: Output SD program poster images during xml output and enhance caching logic 2026-06-04 15:17:58 -05:00
None
7e22172070 fix: remove PUID auto-detect
The auto-detect read PUID/PGID from /data/db ownership (UID 102 in pre-PUID images), causing all upgrading users to run as UID 102 instead of the expected UID 1000. This broke host-side access (SSH, WinSCP), made existing DATA_DIR files unwritable, and failed comskip on recordings created before the change.
2026-03-17 19:32:07 -05:00
None
9e720f4fc7 fix: handle chown failures gracefully on external mounts
DATA_DIRS chown failures (NFS, SMB/CIFS, FUSE) crashed the container under set -e. The old image never chowned these directories, so users with external mounts had a working setup that broke on upgrade with zero config changes.

- Collect mkdir and chown failures per-directory instead of crashing
- Emit a single consolidated warning listing all affected directories with current ownership and remediation steps
- Container continues to start; Django reports at runtime if it cannot write to a specific directory
- Local volumes are unaffected: chown still runs and succeeds silently
2026-03-17 18:27:19 -05:00
None
19d3f4258f Add /data/backups to DATA_DIRS
Corrects issue with user ownership migration on previous installations with /data/backups in-use
2026-03-17 17:46:13 -05:00
None
29525336ab replace migration port and correct variable quoting for guarding
- replaced $_pg_tmp_port with $POSTRGES_PORT in migration logic. Works because "pg_ctl stop -w" is run before entrypoint.sh restarts postgres. Verified that this does not cause a race condition.

- Correcting unquoted environment variables to prevent inappropriate variables from causing execution inconsistencies (still unquoted in comments and prints)
2026-03-12 20:25:54 -05:00
None
52ed0fc15a fix: run PostgreSQL as PUID/PGID user to resolve ownership conflicts (#1078)
PostgreSQL now runs as the PUID/PGID user ($POSTGRES_USER) instead of the internal postgres system user (UID 102). This fixes container startup failures when PUID/PGID is set, caused by chown permission errors on restricted filesystems (NFS root_squash, CIFS) and UID collisions with the postgres system user.

Changes:
- Run all PostgreSQL operations (initdb, pg_ctl, psql) as $POSTGRES_USER
- Auto-detect PUID/PGID from existing data owner when not explicitly set
- Validate PUID/PGID (reject zero, non-numeric values) before startup
- Migrate existing data ownership with sentinel-based skip optimization
- Use trust auth for local Unix sockets, md5 for network connections
- Add promote_app_role() and ensure_app_database() as idempotent startup guarantees that handle fresh installs, upgrades, and PUID changes
- Preserve postgres role as superuser for rollback compatibility
- Centralize /data/db ownership in 02-postgres.sh (sentinel-aware)
- Add integration test suite (20 scenarios) covering fresh installs, upgrades, restarts, PUID changes, UID collisions, bind mounts, modular mode, PG major upgrades, and end-to-end web UI verification
2026-03-11 23:36:32 -05:00
dekzter
d5349dcf4f create scripts directory 2026-02-26 14:07:34 -05:00
sethwv-alt
b157159b87
Fix root-owned __pycache__ by running Django commands as non-root user 2025-12-31 12:16:19 -05:00
SergeantPanda
18645fc08f Bug Fix: Re-apply failed merge to fix clients that don't have ipv6 support. 2025-12-22 16:39:09 -06:00
SergeantPanda
20182c7ebf
Merge branch 'main' into dev 2025-12-19 17:53:06 -06:00
SergeantPanda
f0a9a3fc15 Bug Fix: Docker init script now validates DISPATCHARR_PORT is an integer before using it, preventing sed errors when Kubernetes sets it to a service URL like tcp://10.98.37.10:80. Falls back to default port 9191 when invalid (Fixes #737) 2025-12-19 17:00:30 -06:00
dekzter
c51916b40c
Revert "Advanced Filtering" 2025-12-12 08:30:17 -05:00
SergeantPanda
69f9ecd93c Bug Fix: Remove ipv6 binding from nginx config if ipv6 is not available. 2025-12-08 20:12:44 -06:00
SergeantPanda
93f074241d Bug fix/enhancement: Check if we're the owner of /data and set ownership if not. Also pre-create /data/models folder 2025-11-04 09:03:39 -06:00
SergeantPanda
d456051eb3 Verify /app also has the correct permissions. 2025-10-18 19:52:22 -05:00
SergeantPanda
9b07f013a4 Refactor directory creation and ownership management in init script for clarity and maintainability. Will only chown recursively if we are not the owner. This should help improve boot speeds. 2025-10-18 19:33:23 -05:00
SergeantPanda
41d7066d6e Fix incorrect paths for DVR and Plugins. 2025-09-13 11:49:04 -05:00
SergeantPanda
75816b5d8e Change folder creation for Recordings in entrypoint from 'recordings' to 'Recordings' 2025-09-13 09:07:08 -05:00
dekzter
7a90cc8ae3 re-adding in removal of frontend artifacts from dockerfile, re-added chown of /app directory 2025-04-07 08:36:19 -04:00
dekzter
354cd84c88 filesystem watch and process of m3u and epg 2025-04-06 15:58:55 -04:00
dekzter
ecc96f8b69 memory optimization, m3u processing, re-added group filtering before m3u ingestion 2025-04-06 11:36:16 -04:00
SergeantPanda
472c20627c Update Docker images to use ghcr.io and clean up ownership commands in init script 2025-04-05 21:56:58 -05:00
dekzter
00f6e7c1cd first run at recordings, among other things 2025-04-05 18:59:15 -04:00
dekzter
82b426f82a moved some perms around and new folders 2025-04-05 14:34:08 -04:00
dekzter
f9e269bfda fixing permissions so can work on mac 2025-04-02 16:29:35 -04:00
dekzter
1b75fbc90a postgres dir var, nginx variable replacement, more permission modification 2025-04-02 16:28:58 -04:00
dekzter
306e4d1442 fixing perms 2025-03-25 11:12:36 -04:00
SergeantPanda
e6097c4a80 Added folder creation and permission changes for /app/media/cached_m3u 2025-03-22 12:32:14 -05:00
dekzter
01f5b99f72 conditional manage perms since mac doesn't need it 2025-03-06 16:33:30 -05:00
dekzter
206a0814be updated scripts, attempting to fix perms issue on socket 2025-03-05 14:53:47 -05:00
dekzter
59f8ec033c init npm / node on dev environment setup, run npm server (need to make this configurable), more init items for dispatcharr 2025-03-05 08:33:12 -05:00
dekzter
6b0becce62 first attempt to switch to uwsgi 2025-03-04 20:02:40 -05:00