Spaces:
Sleeping
Sleeping
File size: 547 Bytes
2434dca 5e1d569 9877c43 5e1d569 9877c43 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# Use an official Node.js runtime as a parent image
FROM node:20-alpine
# Set the working directory
WORKDIR /src
# Copy package.json and package-lock.json (if available)
COPY src/package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application source code
COPY src/ ./
# Expose the port expected by Hugging Face Spaces
EXPOSE 9090
# Start the application on 0.0.0.0 and use the port from $PORT (default 9090), allow all hosts
CMD ["sh", "-c", "npm start -- --host 0.0.0.0 --port ${PORT:-9090} --allowed-hosts all"] |