Files
dupe/Dockerfile
2026-01-25 17:32:58 +03:00

51 lines
1.0 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Build client
FROM node:22-alpine AS client
WORKDIR /app/client
COPY client/package*.json ./
RUN npm ci || npm i
COPY client .
RUN npm run build
# Build server
FROM node:22-slim
# Puppeteer için gerekli bağımlılıklar
RUN apt-get update && apt-get install -y \
ffmpeg \
curl \
wget \
ca-certificates \
fonts-liberation \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libatspi2.0-0 \
libcups2 \
libdbus-1-3 \
libdrm2 \
libgbm1 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libwayland-client0 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxkbcommon0 \
libxrandr2 \
xdg-utils \
chromium \
chromium-driver \
&& rm -rf /var/lib/apt/lists/*
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp \
&& chmod a+rx /usr/local/bin/yt-dlp
WORKDIR /app/server
COPY server/package*.json ./
RUN npm ci || npm i
COPY server .
# Move files to public folder
COPY --from=client /app/client/dist ./public
EXPOSE 3001
CMD ["npm", "start"]