-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
48 lines (39 loc) · 1.16 KB
/
Dockerfile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Use an official Node.js runtime as a parent image
FROM node:18-slim
# Install system dependencies required for Playwright
RUN apt-get update && apt-get install -y \
wget \
ca-certificates \
fonts-liberation \
libappindicator3-1 \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libcups2 \
libdbus-1-3 \
libgdk-pixbuf2.0-0 \
libnspr4 \
libnss3 \
libx11-xcb1 \
libxcomposite1 \
libxdamage1 \
libxrandr2 \
xdg-utils \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory inside the container
WORKDIR /app
# Install pnpm globally
RUN npm install -g pnpm
# Copy package.json and pnpm-lock.yaml (or pnpm-workspace.yaml if applicable) into the container
COPY package.json pnpm-lock.yaml* ./
# Install dependencies using pnpm
RUN pnpm install
# Copy the rest of the application code
COPY . .
# Install Playwright and its required dependencies
RUN pnpx playwright install
# Expose the port your app runs on (you may need to change this based on your app)
EXPOSE 3006
# Run your app (adjust this to your start script, using pnpm to run the right start script)
CMD ["pnpm", "start"]