Spaces:
Paused
Paused
Download Dockerfile from imkrish/yatra-x-admin: direct link, hf CLI and curl.
- Browser
- Download file 608 Bytes
-
https://huggingface.co/spaces/imkrish/yatra-x-admin/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/imkrish/yatra-x-admin/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/imkrish/yatra-x-admin/resolve/main/Dockerfile
608 Bytes
| # Production Dockerfile for Admin Service | |
| FROM node:18-alpine | |
| WORKDIR /app | |
| # Install dependencies first (for layer caching) | |
| COPY package*.json ./ | |
| RUN npm install --production | |
| # Copy source code | |
| COPY . . | |
| # Set environment variables | |
| ENV NODE_ENV=production | |
| ENV PORT=8080 | |
| # Expose Cloud Run default port | |
| EXPOSE 8080 | |
| # Run as non-root user for security | |
| RUN chown -R node:node /app | |
| USER node | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ | |
| CMD wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1 | |
| # Start the server | |
| CMD ["npm", "start"] | |