fix: standalone start script copies static files automatically
- scripts/start.js: copies .next/static to .next/standalone/.next/static before launching the standalone server (prevents CSS 404) - package.json: start script now uses scripts/start.js - Dockerfile: removed fragile manual better-sqlite3 copy (already included in standalone output) - scripts/setup.sh: added local prod option for npm start
This commit is contained in:
+2
-4
@@ -16,13 +16,11 @@ ENV NODE_ENV=production
|
||||
RUN addgroup --system --gid 1001 nodejs && \
|
||||
adduser --system --uid 1001 nextjs
|
||||
|
||||
RUN mkdir -p /app/data/covers && chown -R nextjs:nodejs /app/data
|
||||
|
||||
COPY --from=builder /app/public ./public
|
||||
RUN mkdir .next
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
COPY --from=builder /app/node_modules/better-sqlite3 ./node_modules/better-sqlite3
|
||||
|
||||
RUN mkdir -p /app/data/covers && chown -R nextjs:nodejs /app/data
|
||||
|
||||
USER nextjs
|
||||
EXPOSE 3000
|
||||
|
||||
Reference in New Issue
Block a user