mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-19 16:15:45 +00:00
fix(docker): set 0755 on web static assets so nginx worker can read
pnpm build under a restrictive umask produces 0600 files; when copied into nginx:alpine, the non-root nginx worker hits EACCES and serves 403 for every static asset. Force mode via COPY --chmod=0755 (Docker BuildKit applies uniformly — directories need the exec bit for traversal, static files don't care about the extra bit). Closes #761
This commit is contained in:
1 parent
8fb0300914
commit
2a61365353
1 file changed
+3
-2
+3
-2
@@ -18,8 +18,9 @@ RUN pnpm build
|
||||
# ── Stage 2: Serve ──
|
||||
FROM nginx:1.27-alpine
|
||||
|
||||
# Copy built assets
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
# Copy built assets — force 0755 so the nginx worker (non-root) can read them
|
||||
# regardless of pnpm's build-time umask (see #761).
|
||||
COPY --chmod=0755 --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
# Copy nginx config
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
Reference in new issue
Block a user