feat(frontend): enable Nuxt SSR and migrate to Nitro server

Set `ssr: true` in Nuxt config and switch build command to `nuxt build`.
Update Dockerfile to run `.output/server/index.mjs` and remove static server.
Defer SEO initialization to prevent premature evaluation during SSR.
This commit is contained in:
2026-05-06 10:28:12 +08:00
parent cf1eb6965e
commit 35ee164794
7 changed files with 34 additions and 102 deletions

View File

@@ -19,12 +19,12 @@ RUN pnpm --filter @pokopia/frontend build
FROM node:22-alpine
ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=20015
WORKDIR /app
COPY --from=build /app/frontend/.output ./.output
COPY frontend/static-server.mjs ./static-server.mjs
USER node
EXPOSE 20015
CMD ["node", "static-server.mjs"]
CMD ["node", ".output/server/index.mjs"]