diff --git a/Dockerfile b/Dockerfile index 98dae8c..efde12b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,12 +16,18 @@ FROM node:20-alpine WORKDIR /app +# Install build dependencies for better-sqlite3 +RUN apk add --no-cache python3 make g++ + RUN addgroup -g 1001 -S nodejs && adduser -S nextjs -u 1001 COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static +# Copy node_modules for native dependencies like better-sqlite3 +COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules + RUN mkdir -p /app/public /app/data && chown -R nextjs:nodejs /app/public /app/data ENV NODE_ENV=production PORT=3000 HOSTNAME=0.0.0.0 diff --git a/next-env.d.ts b/next-env.d.ts index c4b7818..9edff1c 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/dev/types/routes.d.ts"; +import "./.next/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.