forked from GoogleChrome/rendertron
-
Notifications
You must be signed in to change notification settings - Fork 0
Cloud Run 化 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kaiinui
wants to merge
1
commit into
main
Choose a base branch
from
feature/cloud_run
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Cloud Run 化 #2
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| FROM node:14-slim | ||
|
|
||
| # @see Derived from https://github.com/GoogleChrome/rendertron/issues/775 | ||
|
|
||
| # Update aptitude with new repo | ||
| RUN apt-get update | ||
|
|
||
| # Install software | ||
| RUN apt-get install -y git | ||
|
|
||
| # Install Chromium dependencies (https://github.com/puppeteer/puppeteer/issues/1598#issuecomment-473436669) | ||
| RUN apt-get install -y libatk1.0-0 libatk-bridge2.0-0 libgtk-3-0 libgbm1 libnss3 libasound2 | ||
|
|
||
| # Fetch repository | ||
| RUN git clone https://github.com/GoogleChrome/rendertron.git | ||
|
|
||
| # Get inside the cloned folder | ||
| WORKDIR ./rendertron | ||
|
|
||
| # Copy config.json from local filesystem to image working-dir | ||
| COPY config.json . | ||
|
|
||
| # Build application | ||
| RUN npm install | ||
| RUN npm run build | ||
|
|
||
| # Launch application | ||
| CMD [ "npm", "run", "start" ] | ||
|
|
||
| # Expose port | ||
| EXPOSE 3000/tcp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1 @@ | ||
| { | ||
| "cache": "datastore", | ||
| "cacheConfig": { | ||
| "cacheDurationMinutes": 1440, | ||
| "cacheMaxEntries": -1 | ||
| } | ||
| } | ||
|
|
||
| {} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| #!/bin/bash | ||
|
|
||
| # @see Derived from https://github.com/GoogleChrome/rendertron/issues/775 | ||
|
|
||
| GOOGLE_CLOUD_PROJECT=$1 | ||
| REGION="asia-northeast1" | ||
| IMAGE="gcr.io/${GOOGLE_CLOUD_PROJECT}/rendertron" | ||
|
|
||
|
|
||
| # Build container image | ||
| gcloud \ | ||
| --project=${GOOGLE_CLOUD_PROJECT} \ | ||
| builds submit \ | ||
| --tag \ | ||
| $IMAGE | ||
|
|
||
| # Deploy service on Cloud Run | ||
| gcloud \ | ||
| --project=${GOOGLE_CLOUD_PROJECT} \ | ||
| run deploy \ | ||
| rendertron \ | ||
| --region=${REGION} \ | ||
| --allow-unauthenticated \ | ||
| --image $IMAGE |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
意図的に消してるとのことなんですけど、ここが SEO 的にわりと微妙なところなので、最初は以前の仕様の通りの方が良いかなと考えています。
というのも、Googlebot が1サイトに対してクロールできる時間が限られているという前提(SEOチームの見解ではそういう認識だった気がします)で考えると、キャッシュがない状態では古いページであっても1ページをクロールするのに毎回10秒ずつかけることになり、他の新しいページをクロールする時間がなくなって、結果的にクロール対象となるページが少なくなる、という懸念があります。
実際、そういった理由で後からキャッシュを入れて、その後クロール対象になるページが増えていたはずです(ログ確認しておきます)