Spaces:
Paused
Paused
FROM node:20 | |
RUN npm install -g pnpm | |
EXPOSE 7860 | |
ENV HOSTNAME 0.0.0.0 | |
ENV PORT 7860 | |
# Create a non-root user | |
RUN useradd -m appuser | |
# Set the working directory | |
WORKDIR /home/appuser/react-video-editor | |
# Clone the code repository | |
RUN git clone https://github.com/designcombo/react-video-editor.git . | |
# Change ownership of the entire project directory | |
RUN chown -R appuser:appuser /home/appuser/react-video-editor | |
# Switch to the non-root user | |
USER appuser | |
# Install pnpm | |
# Install dependencies | |
RUN pnpm install | |
# Set permissions for the working directory | |
RUN chmod -R 777 /home/appuser/react-video-editor | |
# Start the application | |
CMD ["pnpm", "run", "dev", "--", "--host"] | |