Spaces:
Paused
Paused
Download Dockerfile from Ethscriptions/video: direct link, hf CLI and curl.
- Browser
- Download file 859 Bytes
-
https://huggingface.co/spaces/Ethscriptions/video/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Ethscriptions/video/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Ethscriptions/video/resolve/main/Dockerfile
859 Bytes
| # ---- build ------------------------------------------------------------- | |
| FROM node:20-alpine AS build | |
| WORKDIR /app | |
| COPY package.json ./ | |
| RUN npm install --no-audit --no-fund | |
| COPY . . | |
| # the song lives in 素材/; copy it into the site (download it if LFS was not materialised) | |
| RUN mkdir -p public && \ | |
| if [ -f "素材/黑街.mp3" ] && [ "$(stat -c%s "素材/黑街.mp3")" -gt 100000 ]; then \ | |
| cp "素材/黑街.mp3" public/heijie.mp3; \ | |
| else \ | |
| wget -q -O public/heijie.mp3 "https://huggingface.co/spaces/Ethscriptions/video/resolve/main/%E7%B4%A0%E6%9D%90/%E9%BB%91%E8%A1%97.mp3"; \ | |
| fi && \ | |
| npm run build | |
| # ---- run --------------------------------------------------------------- | |
| FROM node:20-alpine | |
| WORKDIR /app | |
| COPY --from=build /app/dist ./dist | |
| COPY server.mjs ./ | |
| ENV PORT=3000 | |
| EXPOSE 3000 | |
| USER node | |
| CMD ["node", "server.mjs"] | |