Deploy Remix to Firebase Hosting
Dockerfile
Run
firebase-init
, select hosting, pick your existing project, use the default public directory, and do not configure as a single-page appDelete the public folder that Firebase created
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>"}}]}}
npm run build
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
- Build apps and APIs 10x faster
- Built-in authorization and caching
- 8x more performant than hand-rolled APIs