Test / Dockerfile
KilersBotz's picture
Update Dockerfile
643f78f verified
Raw
History Blame Contribute Delete
734 Bytes
FROM mcr.microsoft.com/playwright:focal
# Skip Playwright browser downloads
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
# Set timezone
ENV TZ=Asia/Jakarta
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
WORKDIR /app
COPY . .
# Install dependencies
RUN npm install
# Install Playwright dependencies and browser
RUN npx playwright install --with-deps
# Install additional dependencies for fonts
RUN apt-get update && apt-get install -y \
wget \
fontconfig \
fonts-noto-color-emoji \
fontconfig \
--no-install-recommends && \
rm -rf /var/lib/apt/lists/*
# Set environment variable for the app port
ENV PORT=7860
# Expose the port
EXPOSE 7860
# Start the application
CMD ["node", "index.js"]