Commit Graph
32 Commits
Author SHA1 Message Date
yiling 661e836f06 fix(docker): support non-root/restricted container environments in entrypoint
Checks if the container is running as root (UID 0) before executing
chown and gosu. If running directly as a non-root user (e.g. in hardened
environments like Kubernetes runAsNonRoot or via docker run --user),
it directly execs the command, preventing EACCES and permission errors.
2026-06-23 09:56:31 +08:00
yiling a390643458 feat(docker): add root entrypoint with privilege dropping for data volumes
This updates the Dockerfile and adds a scripts/docker-entrypoint.sh script.
Under native Linux (like Debian), when docker-compose mounts a host folder
as a volume (e.g. `./data:/app/data`), and the folder doesn't exist, the
docker daemon creates the folder as root-owned (`root:root`).

Because the container runs as a non-root user `bun`, it gets permission
denied (`EACCES`) when trying to write to the data directory.

To resolve this in a beginner-friendly way without manual host-side
permissions updates:
1. The runner stage now installs `gosu`.
2. At the end of the Dockerfile, the user switches back to `root` so the
   container launches as root.
3. On launch, the entrypoint script executes. Since it runs as root, it
   automatically changes ownership of `/app/data` to `bun:bun`.
4. The entrypoint script then uses `gosu` to drop privileges and launch the
   actual server processes as the non-root `bun` user.
2026-06-23 09:46:56 +08:00
yiling 5f1e0c1823 chore(cli): rename npm package to @shumai-one/shumai-cli 2026-06-22 14:16:47 +08:00
yiling 1c994adce9 build(cli): bundle hono and ulid directly into the CLI script for zero dependency distribution 2026-06-21 19:15:41 +08:00
yiling afd55eca85 chore(cli): add @shumai-one/cli to local release testing script 2026-06-21 19:06:12 +08:00
yiling 29e3d3ae03 refactor(cli): rename shumai-cli folder to cli and integrate packaging script 2026-06-21 19:00:38 +08:00
yiling efa0e75a06 fix(release): bundle zod for shumai webapp and keep it external for workers 2026-06-20 14:39:43 +08:00
yiling 93b4656939 feat(cli): add daemon mode and stop, logs, restart subcommands 2026-06-20 12:37:49 +08:00
yiling 982bca9383 fix(release): resolve correct workspace dependency versions and refine CI smoke tests 2026-06-20 11:43:44 +08:00
yiling d1061a1023 fix(release): exclude zod from inlined dependencies to resolve circular evaluation error 2026-06-20 11:30:22 +08:00
yiling 66d07d1fb0 feat(webui): show app version in avatar menu using local version file 2026-06-19 22:57:26 +08:00
yiling 5542538a64 feat(webui): show app version in avatar menu 2026-06-19 22:34:12 +08:00
yiling e5084cc8b3 fix(build): propagate termination signals to active child process in wrappers 2026-06-13 12:51:30 +08:00
yiling d230a1fd4a feat(npm): add dotenv loading and fix variable interpolation in wrapper 2026-06-13 10:21:36 +08:00
yiling 210ed5f95a feat(npm): auto deploy database migrations on package start 2026-06-13 09:24:54 +08:00
yiling dc63ab3eaf fix(npm): resolve binary output path mapping in build-npm script 2026-06-12 21:54:15 +08:00
yiling d06dfc0ab3 perf(npm): optimize platform binary compilation using dummy runner 2026-06-12 21:50:18 +08:00
yiling 91fedf1477 fix(cli): resolve all external module imports in global CLI package 2026-06-12 21:08:40 +08:00
yiling 1fee0f5a97 fix(cli): resolve platform binary path resolution under nested node_modules 2026-06-12 20:34:07 +08:00
yiling 12d8681cd1 fix(npm): add repository metadata for provenance validation 2026-06-12 18:47:28 +08:00
yiling 81ccc803db fix(webui): update members dialog UI and disable auto-focus 2026-06-11 10:54:41 +08:00
yiling ca4b661891 feat(npm): pin runtime dependencies in build-npm script 2026-06-11 10:36:47 +08:00
yiling 39d34b9678 fix(lint): remove unused variable in extract-runtime-deps script 2026-06-11 10:13:53 +08:00
yiling 5facd98b0d feat(docker): pin runtime dependencies using dynamic package.json 2026-06-11 10:10:55 +08:00
yiling e790df2812 fix: resolve lint, typecheck, and tsconfig deprecation errors 2026-06-07 11:10:27 +08:00
yiling 53bed7b26d feat(npm): add win-arm64 compilation target and fix win32 wrapper path mapping 2026-06-05 17:33:18 +08:00
yiling 06b276f0a7 feat(npm): add cross-platform packaging, publishing, and release automation 2026-06-05 17:01:25 +08:00
yiling 042188cc74 feat(publish): compile and package workers for npm and isolate workflow imports 2026-06-05 14:34:22 +08:00
yiling dfdf095be7 feat(publish): compile app to binary and package for npm 2026-06-05 14:16:37 +08:00
yiling 1f341c15d0 refactor(monorepo): decouple api and webui into workspaces packages 2026-06-01 23:35:00 +08:00
yiling 5173bb2a01 feat: remove all ai transcription related code and schema 2026-05-28 14:23:02 +08:00
yiling 9cad96210c initial commit 2026-05-19 16:05:09 +08:00