fix(playwright): use playwright docker image due to runtime error

This commit is contained in:
Amruth Pillai 2022-03-07 23:09:14 +01:00
parent 28ba2b1b8f
commit 2696a54d17
No known key found for this signature in database
GPG Key ID: E3C57DF9B80855AD
3 changed files with 28 additions and 11 deletions

23
docker-compose.prod.yml Normal file
View File

@ -0,0 +1,23 @@
version: '3'
services:
server:
image: amruthpillai/reactive-resume:server-latest
container_name: server
env_file: .env
ports:
- 3100:3100
depends_on:
- postgres
client:
image: amruthpillai/reactive-resume:client-latest
container_name: client
env_file: .env
ports:
- 3000:3000
depends_on:
- server
volumes:
pgdata:

View File

@ -16,14 +16,14 @@
"dev:schema": "pnpm -F schema dev",
"dev:server": "pnpm -F server start:dev",
"dev:client": "pnpm -F client dev",
"dev": "env-cmd concurrently --kill-others \"pnpm run dev:*\"",
"dev": "env-cmd --silent concurrently --kill-others \"pnpm run dev:*\"",
"build:schema": "pnpm -F schema build",
"build:server": "pnpm -F server build",
"build:client": "pnpm -F client build",
"build": "env-cmd concurrently \"pnpm run build:*\"",
"build": "env-cmd --silent concurrently \"pnpm run build:*\"",
"start:server": "pnpm -F server start:prod",
"start:client": "env-cmd pnpm -F client start",
"start": "env-cmd concurrently --kill-others \"pnpm run start:*\""
"start:client": "pnpm -F client start",
"start": "env-cmd --silent concurrently --kill-others \"pnpm run start:*\""
},
"dependencies": {
"concurrently": "^7.0.0",

View File

@ -27,16 +27,10 @@ COPY --from=dependencies /app/server/node_modules ./server/node_modules
RUN pnpm run build:schema
RUN pnpm run build:server
FROM ubuntu:focal as production
FROM mcr.microsoft.com/playwright:focal as production
WORKDIR /app
RUN apt-get update \
&& apt-get install -y curl g++ make \
&& curl -sL https://deb.nodesource.com/setup_16.x | bash \
&& apt-get install -y nodejs \
&& PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npx playwright install-deps chromium
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
COPY --from=builder /app/pnpm-*.yaml .