Files
solid-demo/Dockerfile
KoCoder 6d6dcb66a1
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m6s
Initial Commit
2026-05-30 12:52:07 +02:00

34 lines
778 B
Docker

FROM node:24-alpine AS builder
# Enable pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /app
# Copy package files and install dependencies
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
RUN pnpm install --frozen-lockfile
# Copy the rest of the application code and build
COPY . .
RUN CI="true" pnpm run build
# Production stage
FROM node:24-alpine AS runner
WORKDIR /app
# Set environment variables for production
ENV NODE_ENV=production
ENV PORT=3000
# Copy only the built output from the builder stage
# Nitro typically outputs the production server to .output/
COPY --from=builder /app/.output ./.output
COPY --from=builder /app/package.json ./
EXPOSE 3000
# Start the production server
CMD ["node", ".output/server/index.mjs"]