Add Dockerfile for pdfHandler
This commit is contained in:
5
packages/content-fetch/.dockerignore
Normal file
5
packages/content-fetch/.dockerignore
Normal file
@ -0,0 +1,5 @@
|
||||
node_modules
|
||||
.env*
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
*.yaml
|
||||
5
packages/inbound-email-handler/.dockerignore
Normal file
5
packages/inbound-email-handler/.dockerignore
Normal file
@ -0,0 +1,5 @@
|
||||
node_modules
|
||||
build
|
||||
.env*
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
5
packages/pdf-handler/.dockerignore
Normal file
5
packages/pdf-handler/.dockerignore
Normal file
@ -0,0 +1,5 @@
|
||||
node_modules
|
||||
build
|
||||
.env*
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
27
packages/pdf-handler/Dockerfile
Normal file
27
packages/pdf-handler/Dockerfile
Normal file
@ -0,0 +1,27 @@
|
||||
FROM node:14.18-alpine
|
||||
|
||||
# Run everything after as non-privileged user.
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json .
|
||||
COPY yarn.lock .
|
||||
COPY tsconfig.json .
|
||||
COPY .prettierrc .
|
||||
COPY .eslintrc .
|
||||
|
||||
COPY /packages/pdf-handler/package.json ./packages/pdf-handler/package.json
|
||||
|
||||
RUN yarn install --pure-lockfile
|
||||
|
||||
ADD /packages/pdf-handler ./packages/pdf-handler
|
||||
RUN yarn workspace @omnivore/pdf-handler build
|
||||
|
||||
# After building, fetch the production dependencies
|
||||
RUN rm -rf /app/packages/pdf-handler/node_modules
|
||||
RUN rm -rf /app/node_modules
|
||||
RUN yarn install --pure-lockfile --production
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["yarn", "workspace", "@omnivore/pdf-handler", "start"]
|
||||
|
||||
@ -20,7 +20,10 @@
|
||||
"deploy": "yarn build && yarn gcloud-deploy"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^14.11.2"
|
||||
"@types/node": "^14.11.2",
|
||||
"chai": "^4.3.6",
|
||||
"chai-string": "^1.5.0",
|
||||
"mocha": "^10.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@google-cloud/functions-framework": "3.1.2",
|
||||
|
||||
@ -5,5 +5,5 @@
|
||||
"rootDir": ".",
|
||||
"lib": ["dom"]
|
||||
},
|
||||
"include": ["src", "test"]
|
||||
"include": ["src"]
|
||||
}
|
||||
|
||||
4
packages/puppeteer-parse/.dockerignore
Normal file
4
packages/puppeteer-parse/.dockerignore
Normal file
@ -0,0 +1,4 @@
|
||||
node_modules
|
||||
.env*
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
@ -85,6 +85,7 @@ WORKDIR /app
|
||||
|
||||
ENV CHROMIUM_PATH /usr/bin/chromium-browser
|
||||
ENV LAUNCH_HEADLESS=true
|
||||
ENV PORT 9090
|
||||
|
||||
COPY package.json .
|
||||
COPY yarn.lock .
|
||||
|
||||
Reference in New Issue
Block a user