# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use a Node.js 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
# Copy the rest of the application source code
COPY . .
# Build the application
RUN npm run build
# Start a new stage from the smaller node image
FROM node:18-alpine
# Set the working directory
WORKDIR /app
# Copy built files and node_modules from builder
COPY --from=builder /app/build /app/build
COPY --from=builder /app/node_modules /app/node_modules
COPY --from=builder /app/package.json /app/package.json
# Set environment variables for OAuth2
ENV OAUTH_CLIENT_ID=your_client_id
ENV OAUTH_CLIENT_SECRET=your_client_secret
ENV OAUTH_REFRESH_TOKEN=your_refresh_token
# Expose the port the app runs on
EXPOSE 3000
# Command to run the application
CMD ["node", "build/index.js"]