diff --git a/Dockerfile b/Dockerfile index 9b27420..2baebe5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,35 +1,27 @@ -# Use Node.js 18 Alpine for smaller size and faster builds FROM node:18-alpine -# Set working directory WORKDIR /app -# Install dependencies for native modules +# Install system dependencies RUN apk add --no-cache libc6-compat # Copy package files COPY package.json pnpm-lock.yaml* ./ -# Enable pnpm and install dependencies -RUN corepack enable pnpm -RUN pnpm install --frozen-lockfile +# Install pnpm and dependencies +RUN corepack enable pnpm && pnpm install --frozen-lockfile -# Copy source code +# Copy all source files COPY . . -# Disable telemetry for faster builds -ENV NEXT_TELEMETRY_DISABLED 1 +# Disable telemetry +ENV NEXT_TELEMETRY_DISABLED=1 -# Build the application -RUN pnpm run build +# Build the app +RUN pnpm build # Expose port EXPOSE 3000 -# Set environment variables -ENV NODE_ENV=production -ENV PORT=3000 -ENV HOSTNAME="0.0.0.0" - # Start the application CMD ["pnpm", "start"] \ No newline at end of file