Spaces:
Sleeping
Sleeping
File size: 590 Bytes
714fe46 f14212d 714fe46 f14212d 714fe46 f14212d 714fe46 f14212d 714fe46 f14212d 714fe46 f14212d 714fe46 |
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 |
FROM node:18-alpine
# Set working directory
WORKDIR /app
# Copy package files
COPY public/package*.json ./
# Install dependencies (production only)
RUN npm ci --omit=dev
# Copy application code
COPY public .
# Expose HF Spaces port (7860)
EXPOSE 7860
# Set production environment
ENV NODE_ENV=production
ENV PORT=7860
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD node -e "require('http').get('http://localhost:7860/health', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})"
# Start application
CMD ["npm", "start"]
|