Spaces:
Sleeping
Sleeping
File size: 748 Bytes
7628f39 c3c1f95 b951cf8 1cefaba b951cf8 c3c1f95 1cefaba c3c1f95 b951cf8 1cefaba b951cf8 d5174df 7628f39 c3c1f95 d5174df b951cf8 1cefaba 06ed0b5 1cefaba | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | # ---------- 1) Build the React client ----------
FROM node:18-alpine AS client
WORKDIR /app/client
# Install client dependencies
COPY client/package.json ./
RUN npm install
COPY client/ ./
RUN npm run build
# ---------- 2) Build the Node server ----------
FROM node:18-alpine AS server
WORKDIR /app/server
# Install server dependencies
COPY server/package.json ./
RUN npm install
COPY server/ ./
# Bring in client build
RUN mkdir -p ../client/dist
COPY --from=client /app/client/dist ../client/dist
# Environment
ENV NODE_ENV=production
ENV PORT=3000
# Provide your ytdl.php API key in HF Space settings:
# Variables and secrets -> Add variable -> Name: YTDL_API_KEY Value: your-key
ENV YTDL_API_KEY="akay"
EXPOSE 3000
CMD ["npm", "start"]
|