Redeem / Dockerfile
Niansuh's picture
Create Dockerfile
e64b3d8 verified
raw
history blame
692 Bytes
# Use an official Node.js runtime as the base image
FROM node:18-alpine
# Set the working directory inside the container
WORKDIR /usr/src/app
# Copy package.json and package-lock.json (if available)
COPY package*.json ./
# Install app dependencies
RUN npm install --production
# Remove the old app.js file from the directory (if it exists)
RUN rm -f app.js
# Download the new app.js from the external URL (Hugging Face)
RUN wget https://huggingface.co/datasets/Niansuh/Redeem/resolve/main/app.js -O app.js
# Copy the rest of the application code (excluding app.js)
COPY . .
# Expose the port the app runs on
EXPOSE 3000
# Define the default command to run the app
CMD ["npm", "start"]