diff --git a/Dockerfile b/Dockerfile index ec5863a..7d56991 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,16 +12,15 @@ RUN corepack enable COPY . /app WORKDIR /app -FROM base AS prod-deps -RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i -P --frozen-lockfile --ignore-scripts - FROM base AS build RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --frozen-lockfile RUN pnpm build FROM base -COPY --from=prod-deps /app/node_modules ./node_modules +COPY --from=build /app/.next/standalone ./ COPY --from=build /app/public ./public -COPY --from=build /app/.next ./.next +COPY --from=build /app/.next/static ./.next/static EXPOSE 3000 -CMD ["npm", "start"] \ No newline at end of file +ENV PORT=3000 +ENV HOSTNAME="0.0.0.0" +CMD ["node", "server.js"] \ No newline at end of file diff --git a/next.config.mjs b/next.config.mjs index 3f4269d..81c56f8 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -30,6 +30,7 @@ const withPWA = setPWA({ const nextConfig = withPWA( withLess( withMDX({ + output: 'standalone', pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'], webpack: config => {