Spaces:
Sleeping
Sleeping
Download Dockerfile.backend from edichat/edi.chat.test: direct link, hf CLI and curl.
- Browser
- Download file 612 Bytes
-
https://huggingface.co/spaces/edichat/edi.chat.test/resolve/main/Dockerfile.backend
- Command line
-
hf download hf://spaces/edichat/edi.chat.test/Dockerfile.backend
-
curl -L -o Dockerfile.backend https://huggingface.co/spaces/edichat/edi.chat.test/resolve/main/Dockerfile.backend
612 Bytes
| # Backend Dockerfile | |
| FROM node:18-alpine AS base | |
| # Create app directory | |
| WORKDIR /app | |
| # Install app dependencies | |
| COPY backend/package*.json ./ | |
| RUN npm ci --only=production && npm cache clean --force | |
| # Copy backend source code | |
| COPY backend/ . | |
| # Create non-root user | |
| RUN addgroup -g 1001 -S nodejs && \ | |
| adduser -S nodejs -u 1001 | |
| # Set ownership and permissions | |
| RUN chown -R nodejs:nodejs /app | |
| USER nodejs | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ | |
| CMD node healthcheck.js || exit 1 | |
| # Expose port | |
| EXPOSE 5000 | |
| # Start the application | |
| CMD ["node", "server.js"] |