fixed dockerfile... and other stuff...

This commit is contained in:
2026-01-26 02:12:18 -05:00
parent 8b3a0a9352
commit 16c2ce4679
16 changed files with 59 additions and 20 deletions

View File

@@ -1,26 +1,28 @@
# Stage 1: Build the Nuxt application
FROM node:20-alpine AS builder
WORKDIR /app
COPY /app/package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:20-alpine AS runner
FROM node:lts-alpine AS builder
WORKDIR /app
COPY --from=builder /app/.output ./.output
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY site/package*.json ./site/
# Ensure necessary environment variables are set if needed at runtime
# Nuxt uses NUXT_ prefix for runtime environment variables
EXPOSE 3030
RUN cd site && npm install
COPY site ./site
RUN cd site && npm run build
ENV NUXT_PORT=3030
FROM node:lts-alpine
WORKDIR /app
#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/
RUN cd site && npm ci --omit=dev
ENV HOST=0.0.0.0
ENV NODE_ENV=production
ENV PORT=3030
# Command to run the application
CMD ["node", "./.output/server/index.mjs"]
EXPOSE 3030
CMD ["node", "site/.output/server/index.mjs"]