Spaces:
Running
Running
# Node base image | |
FROM node:18 | |
# Switch to the "node" user | |
USER node | |
# Set home to the user's home directory | |
ENV HOME=/home/node \ | |
PATH=/home/node/.local/bin:$PATH | |
# Set the working directory to the user's home directory | |
WORKDIR $HOME/app | |
# Moving file to user's home directory | |
ADD . $HOME/app | |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user | |
COPY --chown=node . $HOME/app | |
# Clone HeyGen Github repository | |
RUN git clone https://github.com/mbarnig/InteractiveAvatarNextJSDemo.git | |
# Show content | |
RUN pwd && ls | |
# change folder | |
WORKDIR $HOME/app/InteractiveAvatarNextJSDemo | |
RUN ls -a | |
# RUN npm run dev | |
# RUN node app.js | |
# Loading Dependencies | |
RUN npm install | |
# RUN npm audit fix | |
RUN npm run dev | |
# Expose application's default port | |
EXPOSE 3000 | |
# Entry Point | |
# WORKDIR $HOME/app | |
# RUN node app.js | |
# ENTRYPOINT ["nodejs", "./index.mjs"] | |
# Command to start the application | |
CMD ["npm", "run", "dev"] | |
# CMD ["npm", "run", "build"] | |
# CMD ["npm", "server.js |