mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-07-26 11:49:16 +00:00
fix(docker): add entrypoint for volume permission handling
Add docker-entrypoint.sh that runs as root at startup, fixes ownership of the DATA_DIR volume (only files with wrong user or group), then drops to the non-root sencho user via su-exec before starting Node. This eliminates the SQLITE_READONLY crash that occurs when a host-mounted data volume was created by root or chowned to the wrong UID. The pattern mirrors the official PostgreSQL, Redis, and MariaDB Docker images. - Install su-exec in Stage 3 (10KB Alpine tool, idiomatic alternative to gosu) - Remove USER directive; entrypoint handles the privilege drop instead - Use ENTRYPOINT + CMD so Node becomes PID 1 (correct SIGTERM handling) - Add .gitattributes to enforce LF line endings for *.sh files
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Force LF line endings for shell scripts regardless of the developer's OS.
|
||||
# Shell scripts with CRLF endings will fail with "exec format error" in Linux containers.
|
||||
*.sh text eol=lf
|
||||
Reference in New Issue
Block a user