ca3b60b0ad
- Switched from npm to pnpm for dependency management in Dockerfile, improving build efficiency. - Updated Vue and Vue Router versions in package.json for better compatibility. - Changed placeholder URLs in site.ts to actual Fiverr links and adjusted review count. - Removed obsolete sitemap.xml file to streamline the project. - Added a new rate limiting plugin to manage API request limits for the contact endpoint.
30 lines
660 B
Docker
30 lines
660 B
Docker
# Stage 1: Build
|
|
FROM node:22-alpine AS builder
|
|
WORKDIR /app
|
|
|
|
# Install pnpm via corepack
|
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
|
|
# Copy manifests first for layer caching
|
|
COPY package.json pnpm-lock.yaml ./
|
|
|
|
# Install all dependencies (including devDeps needed for build)
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
# Copy source and build
|
|
COPY . .
|
|
RUN pnpm build
|
|
|
|
# Stage 2: Runtime
|
|
FROM node:22-alpine AS runner
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production
|
|
ENV HOST=0.0.0.0
|
|
ENV PORT=3000
|
|
|
|
# Nuxt SSR bundles all server deps into .output/server/
|
|
COPY --from=builder /app/.output /app/.output
|
|
|
|
EXPOSE 3000
|
|
CMD ["node", "/app/.output/server/index.mjs"]
|