Skip to content
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

docs(deploying-to-firebase.md): add firebase.json cache configuration #21897

Merged
merged 3 commits into from Mar 2, 2020

Conversation

@portenez
Copy link
Contributor

portenez commented Mar 2, 2020

Adds how to update the firebase.json to configure the firebase cache correctly.

Description

The instructions to deploy to firebase hosting were missing the correct firebase.json configuration. This updated config file allows for the correct serving of gatsby content according to the gatsby caching guide: https://www.gatsbyjs.org/docs/caching/

Documentation

Attn @gatsby/learning

References:

Adds how to update the `firebase.json` to configure the firebase cache correctly.
@portenez portenez requested a review from gatsbyjs/learning as a code owner Mar 2, 2020
@portenez

This comment has been minimized.

Copy link
Contributor Author

portenez commented Mar 2, 2020

Here are 2 live sites running this config, if someone wants to take a look:

  1. my personal blog https://vgarcia.dev with service worker.
  2. A sample site deployed to firebase https://gatsby-hosting-example.firebaseapp.com/ without service worker.
@laurieontech laurieontech self-assigned this Mar 2, 2020
@laurieontech laurieontech added this to In progress in Learning Roadmap via automation Mar 2, 2020
@laurieontech laurieontech moved this from In progress to PRs for Review in Learning Roadmap Mar 2, 2020
@laurieontech

This comment has been minimized.

Copy link
Contributor

laurieontech commented Mar 2, 2020

Thanks for the PR! Want to verify this behavior before merging, so hang tight.

@laurieontech

This comment has been minimized.

Copy link
Contributor

laurieontech commented Mar 2, 2020

I'm wondering if we want to include the entire json file or if it'd make more sense to link to the caching docs and note that those recommendations should be followed when setting up firebase.json?

@portenez

This comment has been minimized.

Copy link
Contributor Author

portenez commented Mar 2, 2020

I think it's very useful to have a sample json file. People could be up and running right away after reading this page.

When I was setting up the cache for the first time, I did have the gatsby caching docs available, and even with those open, it took me a couple/several hours to completely get it right.

There a few quirks here and there when setting up, and I had to deploy and test several times. In the end, people would end up with exactly the same json file.

I guess we could indicate that this json asumes the defaults (like building into public) and so on.

@laurieontech

This comment has been minimized.

Copy link
Contributor

laurieontech commented Mar 2, 2020

That seems fair to me. Just wanted to pose the question.

@laurieontech

This comment has been minimized.

Copy link
Contributor

laurieontech commented Mar 2, 2020

Looks good! Let's get this in.

@laurieontech laurieontech merged commit ae30ba8 into gatsbyjs:master Mar 2, 2020
22 checks passed
22 checks passed
Cloud Tests
Details
Danger All good
Details
Peril All green. Nice work.
Details
TypoCheck No typos found
Details
build-test Workflow: build-test
Details
ci/circleci: bootstrap Your tests passed on CircleCI!
Details
ci/circleci: e2e_tests_development_runtime Your tests passed on CircleCI!
Details
ci/circleci: e2e_tests_gatsby-image Your tests passed on CircleCI!
Details
ci/circleci: e2e_tests_path-prefix Your tests passed on CircleCI!
Details
ci/circleci: e2e_tests_production_runtime Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_gatsby_pipeline Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_long_term_caching Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_structured_logging Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: starters_validate Your tests passed on CircleCI!
Details
ci/circleci: themes_e2e_tests_development_runtime Your tests passed on CircleCI!
Details
ci/circleci: themes_e2e_tests_production_runtime Your tests passed on CircleCI!
Details
ci/circleci: unit_tests_node10 Your tests passed on CircleCI!
Details
ci/circleci: unit_tests_node12 Your tests passed on CircleCI!
Details
ci/circleci: unit_tests_node8 Your tests passed on CircleCI!
Details
ci/circleci: unit_tests_www Your tests passed on CircleCI!
Details
ci/circleci: windows_unit_tests Your tests passed on CircleCI!
Details
Learning Roadmap automation moved this from PRs for Review to Done Mar 2, 2020
@gatsbot

This comment has been minimized.

Copy link

gatsbot bot commented Mar 2, 2020

Holy buckets, @portenez — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. We’ve got Gatsby t-shirts, stickers, hats, scrunchies, and much more. (You can also unlock even more free swag with 5 contributions — wink wink nudge nudge.) See gatsby.dev/swag for details.
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.