# UGA AI Assistant with Local Ollama Support FROM node:20-alpine # Install required system dependencies RUN apk add --no-cache git curl bash WORKDIR /app # Copy package files first for better caching COPY package*.json ./ # Install dependencies RUN npm install --only=production --silent # Copy application files COPY app.js index.html ./ # Environment variables for production ENV PORT=7860 \ NO_DATABASE_BLOCKING=true \ NODE_ENV=production \ USE_LOCAL_AI=false \ LOCAL_AI_URL=http://localhost:11434 \ LOCAL_AI_MODEL=llama3:8b EXPOSE 7860 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD curl -f http://localhost:7860/health || exit 1 # Start the application CMD ["node", "app.js"]