Files
DeepTutor/web/lib
enihcam 46681b572c feat(docker): harden image for rootless/RO rootfs + drop runtime sed
The frontend no longer bakes the backend URL into the bundle at build
time and mutates it with sed on every container start. Instead:

  * web/lib/api.ts: apiUrl and wsUrl become one-line pass-throughs, so
    the browser fetches relative paths through the frontend
    (:3782/api/...). All existing call sites keep working unchanged.
  * web/proxy.ts: catches /api/* and /ws/* and rewrites them to
    DEEPTUTOR_API_BASE_URL at request time, reading
    DEEPTUTOR_AUTH_ENABLED for the auth-redirect check.
  * web/lib/auth.ts: switches from NEXT_PUBLIC_AUTH_ENABLED (build-time)
    to DEEPTUTOR_AUTH_ENABLED (set by the entrypoint on every start).
  * Dockerfile: drops the .env.local placeholder block, the sed -i in
    start-frontend.sh, and the runtime API-base fallback chain. Adds
    gosu, bakes a non-root 'deeptutor' user (UID 1000), and has the
    entrypoint chown /app/data and export DEEPTUTOR_API_BASE_URL and
    DEEPTUTOR_AUTH_ENABLED from data/user/settings/*.json on every
    start. supervisord is now invoked under 'gosu deeptutor'.
  * web/tests/api-resolve-base.test.ts: deleted (its 8 tests reference
    resolveBase / isApiBasePlaceholder, both gone; apiUrl/wsUrl are
    now pass-throughs so the rest is meaningless). The auth-redirect
    test is updated to prime DEEPTUTOR_AUTH_ENABLED instead.
2026-06-17 21:40:58 +08:00
..
2026-06-17 10:50:44 +08:00
2026-04-23 19:29:16 +08:00
2026-05-02 20:16:07 +08:00
2026-05-01 13:51:45 +08:00
2026-06-13 21:10:57 +08:00
2026-05-01 01:39:08 +08:00
2026-01-23 01:42:25 +08:00
2026-01-07 10:53:01 +08:00
2026-05-01 01:39:08 +08:00
2026-03-13 01:47:38 +08:00
2026-06-17 00:56:27 +08:00
2026-06-17 10:50:44 +08:00
2026-06-11 20:03:34 +08:00
2026-06-11 20:03:34 +08:00
2026-06-17 00:56:27 +08:00
2026-04-30 23:41:58 +08:00
2026-06-11 20:03:34 +08:00
2026-04-23 19:29:16 +08:00
2026-06-17 00:56:27 +08:00
2026-04-23 19:29:16 +08:00
2026-06-11 20:03:34 +08:00
2026-06-17 10:50:44 +08:00
2026-05-03 16:35:52 +08:00
2026-06-17 00:56:27 +08:00
2026-06-17 00:56:27 +08:00
2026-06-11 20:03:34 +08:00
2026-04-23 19:29:16 +08:00
2026-06-11 20:03:34 +08:00
2026-06-11 20:03:34 +08:00
2026-05-12 02:20:30 +08:00