Fix monitor.js missing from Docker image and SQLITE_CANTOPEN errors
- Copy monitor.js into the standalone build stage (was missing entirely) - Remove node-fetch require — Node 18 has global fetch built-in - Switch from bind mount (./data) to named volume (dashboard-data) so Docker manages permissions correctly for the nextjs user Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -47,6 +47,8 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||
# Create data directory for SQLite
|
||||
RUN mkdir -p /app/data && chown nextjs:nodejs /app/data
|
||||
|
||||
# Copy monitor script and startup script
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/monitor.js ./
|
||||
COPY --chown=nextjs:nodejs start.sh ./
|
||||
RUN chmod +x start.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user