Spaces:
Sleeping
Sleeping
File size: 751 Bytes
5e54402 da819ac 5e54402 da819ac 5e54402 da819ac 5e54402 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | # Use Node.js 18 Alpine for smaller image size
FROM node:18-alpine
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install --only=production
# Copy server source code
COPY . ./
# Create a non-root user
RUN addgroup -g 1001 -S nodejs
RUN adduser -S nodejs -u 1001
# Change ownership of the app directory
RUN chown -R nodejs:nodejs /app
USER nodejs
# Expose port
EXPOSE 7860
# Health check with longer start period and more retries
HEALTHCHECK --interval=60s --timeout=10s --start-period=120s --retries=5 \
CMD curl -f http://localhost:7860/api/health || exit 1
# Start the application
# rebuild trigger 2025-09-01T14:18:50Z
CMD npm start
# rebuild trigger 2025-09-02T03:17:52Z
|