Dockerfile 461 B

1234567891011121314151617181920212223
  1. # Use node.js as base image
  2. FROM node:latest
  3. # Set the working directory
  4. WORKDIR /usr/src/app
  5. # Copy package.json and package-lock.json to the working directory
  6. COPY package*.json ./
  7. # Install the dependencies
  8. RUN npm install
  9. # Copy the source code to the working directory (except the files in .dockerignore)
  10. COPY . .
  11. # Copy the .env.copy file to .env
  12. RUN cp .env.copy .env
  13. # Expose the port
  14. EXPOSE 3000
  15. # Start the application
  16. CMD ["npm", "run", "buy"]