Compare commits

...

2 Commits

Author SHA1 Message Date
773784ee69 add dockerfile 2025-07-13 20:13:37 +02:00
b71b31a40d add dockerfle 2025-07-13 20:13:26 +02:00

33
Dockerfile Normal file
View File

@ -0,0 +1,33 @@
FROM node:22-alpine AS build
WORKDIR /app
RUN corepack enable
# Copy package.json and your lockfile, here we add pnpm-lock.yaml for illustration
COPY package.json pnpm-lock.yaml .npmrc ./
# 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
# Only `.output` folder is needed from the build stage
COPY --from=build /app/.output/ ./
# Change the port and host
ENV PORT=3001
ENV HOST=0.0.0.0
EXPOSE 80
CMD ["node", "/app/server/index.mjs"]