Spaces:
Sleeping
Sleeping
Upload Dockerfile
Browse files- Dockerfile +30 -0
Dockerfile
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use Playwright image
|
| 2 |
+
FROM mcr.microsoft.com/playwright:focal
|
| 3 |
+
|
| 4 |
+
# Set environment variable to avoid Playwright dialog
|
| 5 |
+
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD 1
|
| 6 |
+
|
| 7 |
+
# Specify work directory
|
| 8 |
+
WORKDIR /app
|
| 9 |
+
|
| 10 |
+
# Install FFmpeg
|
| 11 |
+
RUN apt-get update && apt-get install -y ffmpeg
|
| 12 |
+
|
| 13 |
+
# Force no cache with build arg
|
| 14 |
+
ARG CACHEBUST=1
|
| 15 |
+
|
| 16 |
+
# Clone repo with authentication, shallow clone
|
| 17 |
+
RUN --mount=type=secret,id=GITHUB_REPO,required=true \
|
| 18 |
+
git clone --depth=1 $(cat /run/secrets/GITHUB_REPO) .
|
| 19 |
+
|
| 20 |
+
# Install dependencies
|
| 21 |
+
RUN npm install
|
| 22 |
+
|
| 23 |
+
# Install Playwright dependencies dan browser binaries
|
| 24 |
+
RUN npx playwright install --with-deps
|
| 25 |
+
|
| 26 |
+
# Expose port aplikasi
|
| 27 |
+
EXPOSE 7860
|
| 28 |
+
|
| 29 |
+
# Run the application
|
| 30 |
+
CMD ["npm", "start"]
|