Files
parcer/server/Dockerfile

31 lines
659 B
Docker
Raw Normal View History

2024-11-01 16:28:05 +05:30
FROM mcr.microsoft.com/playwright:v1.40.0-jammy
2024-11-01 16:04:22 +05:30
2024-11-01 16:28:05 +05:30
# Set working directory
2024-11-01 16:04:22 +05:30
WORKDIR /app
2024-11-01 16:28:05 +05:30
# Install node dependencies
2024-11-01 16:04:22 +05:30
COPY package*.json ./
COPY maxun-core ./maxun-core
COPY src ./src
COPY server ./server
COPY tsconfig.json ./
COPY server/tsconfig.json ./server/
2024-11-02 00:22:57 +05:30
COPY server/start.sh ./
2024-11-01 16:04:22 +05:30
# Install dependencies
RUN npm install
2024-11-01 16:28:05 +05:30
# Install Playwright browsers and dependencies
2024-11-02 00:22:57 +05:30
RUN npx playwright install --with-deps chromium
# Install xvfb for display support
RUN apt-get update && apt-get install -y xvfb
# Make the script executable
RUN chmod +x ./start.sh
2024-11-01 16:28:05 +05:30
2024-11-01 16:04:22 +05:30
# Expose the backend port
EXPOSE 8080
2024-11-02 00:22:57 +05:30
# Start the backend using the start script
CMD ["./start.sh"]