# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use an official Node.js image as the base image
FROM node:18-alpine AS builder
# Set the working directory
WORKDIR /app
# Copy package.json and package-lock.json
COPY package.json package-lock.json ./
# Install dependencies
RUN npm install --ignore-scripts
# Copy the rest of the application source code
COPY . .
# Build the project
RUN npm run build
# Use a smaller Node.js image for the production release
FROM node:18-alpine AS release
# Set the working directory
WORKDIR /app
# Copy built files and package.json for runtime
COPY --from=builder /app/build /app/build
COPY --from=builder /app/package.json /app/package.json
COPY --from=builder /app/package-lock.json /app/package-lock.json
# Install only production dependencies
RUN npm ci --ignore-scripts --omit=dev
# Define necessary environment variables
ENV NEXT_PUBLIC_SUPABASE_URL=<your_supabase_url>
ENV NEXT_PUBLIC_SUPABASE_ANON_KEY=<your_supabase_anon_key>
# Set the command to run the server
ENTRYPOINT ["node", "build/index.js"]