full build now

This commit is contained in:
2025-12-31 00:38:28 +00:00
parent c0660049f4
commit 1a99fc6572
3 changed files with 89 additions and 86 deletions

View File

@@ -1,21 +1,34 @@
#FROM node:22-alpine AS build
# Build Stage 1
#WORKDIR /app
FROM node:22-alpine AS build
WORKDIR /app
#COPY . ./
RUN corepack enable
#RUN npm i --force
# Copy package.json and your lockfile, here we add pnpm-lock.yaml for illustration
COPY package.json pnpm-lock.yaml ./
#RUN npm run build
# Install dependencies
RUN pnpm i
# Copy the entire project
COPY . ./
# Build the project
RUN pnpm run build
# Build Stage 2
FROM node:22-alpine
WORKDIR /app
COPY .output .
# Only `.output` folder is needed from the build stage
COPY --from=build /app/.output/ ./
ENV HOST=0.0.0.0
# Change the port and host
ENV PORT=3000
ENV HOST=0.0.0.0
EXPOSE 3000
CMD ["node","server/index.mjs"]
CMD ["node", "/app/server/index.mjs"]