2026-01-25 21:03:44 -05:00
|
|
|
# Stage 1: Build the Nuxt application
|
2026-01-26 02:12:18 -05:00
|
|
|
FROM node:lts-alpine AS builder
|
|
|
|
|
|
2026-01-25 21:03:44 -05:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
2026-01-26 02:12:18 -05:00
|
|
|
COPY site/package*.json ./site/
|
2026-01-25 21:03:44 -05:00
|
|
|
|
2026-01-26 02:12:18 -05:00
|
|
|
RUN cd site && npm install
|
|
|
|
|
COPY site ./site
|
|
|
|
|
RUN cd site && npm run build
|
2026-01-25 21:03:44 -05:00
|
|
|
|
2026-01-26 02:12:18 -05:00
|
|
|
FROM node:lts-alpine
|
2026-01-25 21:03:44 -05:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
2026-01-26 02:12:18 -05:00
|
|
|
#COPY --from=builder /app/package*.json ./
|
|
|
|
|
#COPY --from=builder /app/node_modules ./node_modules
|
|
|
|
|
COPY --from=builder /app/site/.output ./site/.output
|
|
|
|
|
COPY --from=builder /app/site/package*.json ./site/
|
2026-01-25 21:03:44 -05:00
|
|
|
|
2026-01-26 02:12:18 -05:00
|
|
|
RUN cd site && npm ci --omit=dev
|
2026-01-25 21:03:44 -05:00
|
|
|
|
2026-01-26 02:12:18 -05:00
|
|
|
ENV HOST=0.0.0.0
|
|
|
|
|
ENV NODE_ENV=production
|
2026-01-25 21:03:44 -05:00
|
|
|
ENV PORT=3030
|
|
|
|
|
|
2026-01-26 02:12:18 -05:00
|
|
|
EXPOSE 3030
|
|
|
|
|
|
|
|
|
|
CMD ["node", "site/.output/server/index.mjs"]
|