Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d5fb0fd
Support deploying to Cloud Run
maikelrobier Jan 30, 2023
c6da4c3
Add cloud run deploy flags
maikelrobier Jan 30, 2023
664bfbc
Provide quick flag to node command
tuliooassis Jan 31, 2023
c487204
Fix quotes
tuliooassis Jan 31, 2023
e90e905
Add resources for Gantt
tuliooassis Jan 31, 2023
ee89f79
Increase timeout to delete file
tuliooassis Jan 31, 2023
e34ac65
Increase memory limit
tuliooassis Feb 2, 2023
07d4e39
Update memory limit
tuliooassis Feb 2, 2023
ca3d30b
Increase CPI number
tuliooassis Feb 2, 2023
8900510
Fix unexpected token
tuliooassis Feb 2, 2023
6ff945a
Set page pdf timeout 0
tuliooassis Feb 2, 2023
d8c85f6
Change log to output to console
tuliooassis Feb 6, 2023
78c2551
Increase maximum size of uploaded data
tuliooassis Feb 6, 2023
5cbceaf
Ensure limit is increased
tuliooassis Feb 6, 2023
dcb1c69
Use signed url if it is provided
tuliooassis Feb 7, 2023
39f596c
Increase timeout to 5 minutes to delete the file
tuliooassis Feb 7, 2023
12f17ae
Only delete file after timeout
tuliooassis Feb 8, 2023
44298ff
Temporary change max instances to 1
tuliooassis Feb 8, 2023
9f8e44c
Disable http by default
tuliooassis Feb 8, 2023
0e53b33
Revert "Disable http by default"
tuliooassis Feb 8, 2023
11af311
Enable trust proxy
tuliooassis Feb 8, 2023
2a5fb91
Use cloud bucket to store pdfs
tuliooassis Feb 8, 2023
a8252cf
Fix filename and add debugger
tuliooassis Feb 8, 2023
5ed6848
Change filename and add response disposition
tuliooassis Feb 8, 2023
44c9cc0
Increase number of instances and sanitize file name
tuliooassis Feb 8, 2023
20dc03f
Change file name structure
tuliooassis Feb 8, 2023
a6c4493
Move jest to dev dependencies
tuliooassis Feb 8, 2023
9899c05
Revert "Move jest to dev dependencies"
tuliooassis Feb 8, 2023
13708cf
Revert "Revert "Move jest to dev dependencies""
tuliooassis Feb 8, 2023
3814dd7
Use file name provided on request
tuliooassis Feb 9, 2023
52738c2
Disable web security and add gcp option
tuliooassis Feb 22, 2023
5db35d4
Remove resources from server
tuliooassis Feb 22, 2023
d08c1d9
Remove wrong param def
tuliooassis Feb 22, 2023
c5fc694
Revert "Remove resources from server"
tuliooassis Feb 22, 2023
a2b5743
Update docker base image
tuliooassis Apr 2, 2024
e732110
Replace registry URL
sagarzong Aug 5, 2024
c268651
Merge pull request #3 from insidepetroleum/changes-for-pulling-from-c…
sagarzong Aug 6, 2024
a8c22c0
Multiregion
sagarzong Aug 6, 2024
b9d2731
Check if the image exists
sagarzong Aug 8, 2024
d033832
Merge pull request #4 from insidepetroleum/changes-for-pulling-from-c…
sagarzong Aug 8, 2024
a60c1fb
If image exists exit 1
sagarzong Aug 8, 2024
fb375f4
Merge pull request #5 from insidepetroleum/changes-for-pulling-from-c…
sagarzong Aug 8, 2024
dcc93ee
fix substitution
sagarzong Aug 8, 2024
fff20d3
Merge pull request #6 from insidepetroleum/changes-for-pulling-from-c…
sagarzong Aug 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .run.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--memory: 8Gi
--max-instances: 4
--cpu: 4
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Based on https://developers.google.com/web/tools/puppeteer/troubleshooting#running_puppeteer_in_docker

FROM node:16.15.0
FROM --platform=linux/amd64 node:17

RUN apt-get update \
&& apt-get install -y wget gnupg ca-certificates \
Expand All @@ -9,7 +9,7 @@ RUN apt-get update \
&& apt-get update \
# Chrome installation is required to get system dependencies. Puppeteer will download required version on its own.
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf --no-install-recommends \
# https://techoverflow.net/2018/06/05/how-to-fix-puppetteer-error-while-loading-shared-libraries-libx11-xcb-so-1-cannot-open-shared-object-file-no-such-file-or-directory/ \
# https://techoverflow.net/2018/06/05/how-to-fix-puppetteer-error-while-loading-shared-libraries-libx11-xcb-so-1-cannot-open-shared-object-file-no-such-file-or-directory/ \
gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 \
libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 \
Expand Down
22 changes: 10 additions & 12 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ const config = {
"cors" : "*",

// Maximum size of the uploaded data
"maximum" : null,
"maximum" : '5000mb',

// Path to static resources to be served. See readme.md for details
"resources" : null,
"resources" : "./src/resources",

// True to pass `--no-sandbox` flag to the chromium
"no-sandbox" : true,

// True to pass `--disable-web-security` flag to the chromium
"disable-web-security": true,

// Maximum amount of parallel puppeteer instances to run
"max-workers" : 5,

// Log level. Possible values: error, warn, info, verbose
"level" : "info",
"level" : "verbose",

// Pass true to wait for page load only (fonts may be missing). Reduces page loading time by at least .5s
"quick" : false,
Expand All @@ -31,15 +34,10 @@ const config = {

// Configuration options for logger
// Set to false to output log to the console
"logger" : {
"rotate" : {
"dirname" : "log",
"filename" : "export-server-%DATE%.log",
"datePattern" : "YYYY-MM-DD",
"maxSize" : "20mb",
"maxFiles" : "30d"
}
}
"logger" : false,

// Upload file to GCP instead of temporary buffer
"gcp" : true,
};

module.exports = { config };
31 changes: 31 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
substitutions:
_SERVICE_NAME: <service-name>
_DEPLOY_REGION: <region>

steps:
# Build the container image
- name: "gcr.io/cloud-builders/docker"
entrypoint: bash
args: ["./scripts/build.sh", "$PROJECT_ID", "$_SERVICE_NAME", "$COMMIT_SHA"]
env:
- "DOCKER_BUILDKIT=1"

# Deploy container image to Cloud Run
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
entrypoint: bash
args:
[
"./scripts/deploy.sh",
"$PROJECT_ID",
"$_SERVICE_NAME",
"$COMMIT_SHA",
"$_DEPLOY_REGION",
]

images:
- "us-docker.pkg.dev/combocurve-registry/combocurve-docker/$_SERVICE_NAME:$COMMIT_SHA"

tags:
- "cloud-run"
- "deploy"
- "$_SERVICE_NAME"
Loading