Spaces:
Paused
Paused
Create Dockerfile
Browse files- Dockerfile +50 -0
Dockerfile
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Base image
|
| 2 |
+
FROM node:20-slim
|
| 3 |
+
|
| 4 |
+
# Install system dependencies for Puppeteer and FFmpeg
|
| 5 |
+
RUN apt-get update && apt-get install -y \
|
| 6 |
+
ffmpeg \
|
| 7 |
+
wget \
|
| 8 |
+
curl \
|
| 9 |
+
ca-certificates \
|
| 10 |
+
git \
|
| 11 |
+
libnss3 \
|
| 12 |
+
libatk1.0-0 \
|
| 13 |
+
libatk-bridge2.0-0 \
|
| 14 |
+
libcups2 \
|
| 15 |
+
libdrm2 \
|
| 16 |
+
libxkbcommon0 \
|
| 17 |
+
libxcomposite1 \
|
| 18 |
+
libxdamage1 \
|
| 19 |
+
libxfixes3 \
|
| 20 |
+
libxrandr2 \
|
| 21 |
+
libgbm1 \
|
| 22 |
+
libpango-1.0-0 \
|
| 23 |
+
libasound2 \
|
| 24 |
+
libatspi2.0-0 \
|
| 25 |
+
libwayland-client0 \
|
| 26 |
+
libx11-xcb1 \
|
| 27 |
+
fonts-liberation \
|
| 28 |
+
libappindicator3-1 \
|
| 29 |
+
libxshmfence1 \
|
| 30 |
+
libxext6 \
|
| 31 |
+
libx11-6 \
|
| 32 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 33 |
+
|
| 34 |
+
# Set working directory
|
| 35 |
+
WORKDIR /index
|
| 36 |
+
|
| 37 |
+
# Bust cache and clone latest commit from GitHub
|
| 38 |
+
ADD "https://api.github.com/repos/IMaduwike/anime-sc/commits?per_page=1" /tmp/latest_commit
|
| 39 |
+
RUN git clone https://github.com/IMaduwike/anime-sc /index
|
| 40 |
+
|
| 41 |
+
# Install Node dependencies from cloned repo
|
| 42 |
+
RUN npm install
|
| 43 |
+
|
| 44 |
+
# Expose HF Space port
|
| 45 |
+
EXPOSE 3000
|
| 46 |
+
ENV PORT=3000
|
| 47 |
+
ENV NODE_ENV=production
|
| 48 |
+
|
| 49 |
+
# Start Node app
|
| 50 |
+
CMD ["node", "index.js"]
|