fix(panel): chown public assets to nextjs so they don't 500

The panel image copied /app/public without --chown, leaving every asset
root:root rwxrwx---. The container runs as the non-root nextjs user (uid
1001), which falls under 'other' (no perms) → EACCES reading any public file
→ Next.js returns 500 for /roboco-logo.png and friends. A redeploy never
helped because the image itself baked in the bad ownership. Chown the public
copy to nextjs:nodejs, matching the standalone/static copies.
This commit is contained in:
Renn F
2026-06-11 18:46:27 +02:00
parent 303c2db289
commit 08540107e5
+5 -2
View File
@@ -55,8 +55,11 @@ ENV NODE_ENV=production
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
# Copy public assets
COPY --from=builder /app/public ./public
# Copy public assets. Must be chowned to the runtime user (nextjs) like the
# standalone/static copies below — without it the assets stay root:root
# rwxrwx--- and the non-root nextjs process gets EACCES serving them, so every
# /public file (e.g. roboco-logo.png) 500s.
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
# Copy standalone build
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./