2023-08-02 18:52:37 -05:00
|
|
|
# playwright doesnt support debian image
|
|
|
|
FROM ubuntu:focal
|
|
|
|
|
2023-08-03 16:54:04 -05:00
|
|
|
RUN apt-get update && apt-get install wget xz-utils -y
|
2023-08-02 18:52:37 -05:00
|
|
|
|
|
|
|
RUN mkdir /data
|
|
|
|
|
|
|
|
WORKDIR /data
|
|
|
|
|
|
|
|
RUN wget https://nodejs.org/dist/v20.5.0/node-v20.5.0-linux-x64.tar.xz -O nodejs.tar.xz \
|
|
|
|
&& mkdir /opt/nodejs \
|
|
|
|
&& tar -xf nodejs.tar.xz --strip-components 1 -C /opt/nodejs \
|
|
|
|
&& rm nodejs.tar.xz
|
|
|
|
ENV PATH="$PATH:/opt/nodejs/bin"
|
|
|
|
RUN npm install -g yarn
|
|
|
|
|
2023-08-03 16:54:04 -05:00
|
|
|
COPY ./package.json ./yarn.lock ./playwright.config.ts ./
|
2023-08-02 18:52:37 -05:00
|
|
|
|
|
|
|
RUN yarn
|
|
|
|
RUN npx playwright install-deps
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2023-08-03 11:21:08 -05:00
|
|
|
RUN yarn prisma generate
|
2023-08-02 18:52:37 -05:00
|
|
|
RUN yarn build
|
|
|
|
|
|
|
|
CMD yarn prisma migrate deploy && yarn start
|