Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +8 -9
Dockerfile
CHANGED
|
@@ -1,10 +1,11 @@
|
|
| 1 |
FROM node:20
|
| 2 |
-
RUN npm install -g pnpm
|
| 3 |
|
| 4 |
-
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Create a non-root user
|
| 10 |
RUN useradd -m appuser
|
|
@@ -21,13 +22,11 @@ RUN chown -R appuser:appuser /home/appuser/react-video-editor
|
|
| 21 |
# Switch to the non-root user
|
| 22 |
USER appuser
|
| 23 |
|
| 24 |
-
# Install pnpm
|
| 25 |
-
|
| 26 |
# Install dependencies
|
| 27 |
RUN pnpm install
|
| 28 |
|
| 29 |
-
#
|
| 30 |
-
RUN
|
| 31 |
|
| 32 |
# Start the application
|
| 33 |
-
CMD ["pnpm", "run", "
|
|
|
|
| 1 |
FROM node:20
|
|
|
|
| 2 |
|
| 3 |
+
RUN npm install -g pnpm
|
| 4 |
|
| 5 |
+
# Hugging Face uses port 7860 by default
|
| 6 |
+
EXPOSE 7860
|
| 7 |
+
ENV PORT 7860
|
| 8 |
+
ENV HOSTNAME "0.0.0.0"
|
| 9 |
|
| 10 |
# Create a non-root user
|
| 11 |
RUN useradd -m appuser
|
|
|
|
| 22 |
# Switch to the non-root user
|
| 23 |
USER appuser
|
| 24 |
|
|
|
|
|
|
|
| 25 |
# Install dependencies
|
| 26 |
RUN pnpm install
|
| 27 |
|
| 28 |
+
# Build the application
|
| 29 |
+
RUN pnpm run build
|
| 30 |
|
| 31 |
# Start the application
|
| 32 |
+
CMD ["pnpm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "7860"]
|