Spaces:
Paused
Paused
Upload 2 files
#1
by mikmc5 - opened
Files changed (2)
- Dockerfile+13-17
- app.jsAdded
1234567891011121314151617181920212223# Use the official Node.js 18 base imageFROM node:18-slim# Set the working directory inside the containerWORKDIR /usr/src/app# Copy the package.json and package-lock.json if availableCOPY package*.json ./# Install the app dependenciesRUN npm install --production# Copy the rest of the application code to the containerCOPY . .# Set environment variable to productionENV NODE_ENV=production# Expose the port Hugging Face Spaces will bind toEXPOSE 3000# Command to start the appCMD ["npm", "start"]12345678910111213141516171819FROM node:20-slimWORKDIR /app# Copy only the bundled application fileCOPY app.js .# Default environment variablesENV PORT=7860ENV NODE_ENV=production# Make the application executableRUN chmod +x app.js# Expose the port that the application usesEXPOSE 7860# Start the application directlyCMD ["./app.js"]
Dockerfile+13-17
app.jsAdded