Spaces:
Sleeping

edi.chat.test / backend /Dockerfile
Claude Code Bot
Claude
Deploy edi.chat UGA AI Assistant to Hugging Face Spaces
0b355ec
Raw History Blame Contribute Delete
714 Bytes
# Backend Dockerfile for edi.chat API
FROM node:20-alpine
# Create app directory
WORKDIR /app
# Create non-root user for security
RUN addgroup -g 1001 -S nodejs && \
adduser -S edichat -u 1001
# Copy package files
COPY package*.json ./
# Install dependencies with better error handling
RUN npm ci --only=production --verbose && \
npm cache clean --force
# Copy source code
COPY . .
# Create logs directory
RUN mkdir -p logs && \
chown -R edichat:nodejs /app
# Switch to non-root user
USER edichat
# Expose port
EXPOSE 5000
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node healthcheck.js || exit 1
# Start the application
CMD ["npm", "start"]