api / Dockerfile
Pratama
Update Dockerfile
6243cb1 verified
Raw
History Blame Contribute Delete
688 Bytes
# Use Playwright image
FROM mcr.microsoft.com/playwright:focal
# Set environment variable to avoid Playwright dialog
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD 1
# Specify work directory
WORKDIR /app
# Install FFmpeg
RUN apt-get update && apt-get install -y ffmpeg
# Force no cache with build arg
ARG CACHEBUST=1
# Clone repo with authentication, shallow clone
RUN --mount=type=secret,id=GITHUB_REPO,required=true \
git clone --depth=1 $(cat /run/secrets/GITHUB_REPO) .
# Install dependencies
RUN npm install
# Install Playwright dependencies dan browser binaries
RUN npx playwright install --with-deps
# Expose port aplikasi
EXPOSE 7860
# Run the application
CMD ["npm", "start"]