-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
44 lines (34 loc) · 864 Bytes
/
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
# Use the official Node.js image as a base image
FROM node:18
# Set the working directory
WORKDIR /usr/src/app
# Install necessary dependencies
RUN apt-get update && \
apt-get install -y \
ffmpeg \
libnss3 \
libxss1 \
libasound2 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libxkbcommon-x11-0 \
libgbm-dev \
xvfb \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Install nodemon globally
RUN npm install -g nodemon
# Copy package.json and package-lock.json
COPY package*.json ./
# Install Node.js dependencies
RUN npm install
# Copy the rest of the application code
COPY . .
# Install Playwright and its dependencies
RUN npx playwright install --with-deps
# Build the TypeScript code
RUN npm run build
# Expose the port your app runs on
EXPOSE 3000
# Run the application
CMD ["node", "dist/index.js"]