Spaces:
Sleeping
Sleeping
Download Dockerfile from harshvisualz/websocket-chat: direct link, hf CLI and curl.
- Browser
- Download file 534 Bytes
-
https://huggingface.co/spaces/harshvisualz/websocket-chat/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/harshvisualz/websocket-chat/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/harshvisualz/websocket-chat/resolve/main/Dockerfile
534 Bytes
| # Stage 1: Build | |
| FROM node:20-alpine AS builder | |
| WORKDIR /app | |
| COPY package*.json ./ | |
| # Install all dependencies including devDependencies for building | |
| RUN npm install | |
| COPY . . | |
| # Build the TypeScript code | |
| RUN npm run build | |
| # Stage 2: Production | |
| FROM node:20-alpine | |
| WORKDIR /app | |
| COPY package*.json ./ | |
| # Install only production dependencies | |
| RUN npm ci --only=production | |
| # Copy built assets from builder stage | |
| COPY --from=builder /app/dist ./dist | |
| # Expose the application port | |
| EXPOSE 7860 | |
| # Start the server | |
| CMD ["npm", "start"] | |