From b4292c1ea35bf7686aecb75d9814618a9bb410f7 Mon Sep 17 00:00:00 2001 From: Jeff Pereira Date: Wed, 3 Jul 2024 11:55:39 -0700 Subject: [PATCH] setting up docker to ts playwright service --- apps/playwright-service-ts/Dockerfile | 19 +++++++++++++++++++ apps/playwright-service-ts/tsconfig.json | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 apps/playwright-service-ts/Dockerfile diff --git a/apps/playwright-service-ts/Dockerfile b/apps/playwright-service-ts/Dockerfile new file mode 100644 index 00000000..b93609f3 --- /dev/null +++ b/apps/playwright-service-ts/Dockerfile @@ -0,0 +1,19 @@ +FROM node:18-slim + +WORKDIR /usr/src/app +COPY package*.json ./ +RUN npm install + +COPY . . + +# Install Playwright dependencies +RUN npx playwright install --with-deps + +RUN npm run build + +ARG PORT +ENV PORT=${PORT} + +EXPOSE ${PORT} + +CMD [ "npm", "start" ] diff --git a/apps/playwright-service-ts/tsconfig.json b/apps/playwright-service-ts/tsconfig.json index e71d09a0..82363d26 100644 --- a/apps/playwright-service-ts/tsconfig.json +++ b/apps/playwright-service-ts/tsconfig.json @@ -26,7 +26,7 @@ /* Modules */ "module": "commonjs", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ + "rootDir": "./", /* Specify the root folder within your source files. */ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ @@ -55,7 +55,7 @@ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ + "outDir": "./dist", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */