analyze / Dockerfile
wuhp's picture
Create Dockerfile
4831e20 verified
raw
history blame contribute delete
447 Bytes
# Use Node image
FROM node:20-slim
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy source
COPY . .
# Build the app
RUN npm run build
# Expose Hugging Face default port
EXPOSE 7860
# Serve the static files using 'serve' package
# We use npx to run it without adding it to package.json,
# or we can use a simple node script if preferred.
CMD ["npx", "serve", "-s", "dist", "-l", "7860"]