# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use a Node.js image
FROM node:22.12-alpine AS builder
# Create app directory
WORKDIR /app
# Install app dependencies
COPY package.json package-lock.json ./
RUN npm install --ignore-scripts
# Copy source code and build the project
COPY . .
RUN npm run build
# Use a smaller base image for the final build
FROM node:22-alpine AS release
# Create app directory
WORKDIR /app
# Copy the built files and node_modules from the builder stage
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
COPY --from=builder /app/node_modules /app/node_modules
# Expose the default ArangoDB port
EXPOSE 8529
# Set environment variables (these should be overridden at runtime)
ENV ARANGO_URL=http://localhost:8529
ENV ARANGO_DATABASE=your_database_name
ENV ARANGO_USERNAME=your_username
ENV ARANGO_PASSWORD=your_password
# Command to run the server
CMD ["node", "build/index.js"]