Files
helium/Dockerfile
2026-06-13 16:41:10 +02:00

38 lines
744 B
Docker

# source: https://content.nuxt.com/docs/deploy/docker
FROM node:22-alpine AS build
WORKDIR /app
RUN corepack enable && corepack prepare pnpm@10.33.0 --activate
# Copy package.json and your lockfile, here we add pnpm-lock.yaml for illustration
COPY package.json pnpm-lock.yaml ./
# Install dependencies
RUN pnpm install --frozen-lockfile
# 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/ ./
# Copy drizzle migrations folder
COPY --from=build /app/drizzle/ ./drizzle/
# Change the port and host
ENV PORT=80
ENV HOST=0.0.0.0
EXPOSE 80
CMD ["node", "/app/server/index.mjs"]