Sign up for Hasura Newsletter

Deploy Remix to Firebase Hosting

githubDockerfile
  1. Run firebase-init, select hosting, pick your existing project, use the default public directory, and do not configure as a single-page app

  2. Delete the public folder that Firebase created

  3. In firebase.json, under hosting add a rewrites value

{
"hosting": {
"public": "public",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"run": {
"serviceId": "<Your cloud run service name>"
}
}
]
}
}
  1. npm run build

  2. firebase deploy

You should get a hosting URL back, check to see if everything worked. Notice network requests on your site should be using the Firebase CDN cache! You're done!

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2022 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin