'Hosting a Google Cloud Run Django app via Firebase
I'm hosting a Django app in the cloud using Google Cloud Run, and I'm trying to work out how to get a few subdomains working right using Firebase. Let's imagine I want it all to be working off of mydomain.com. Here's what I want to do:
I want api-dev.mydomain.com to point to cloud-run-domain.app/api and admin-dev.mydomain.com to point to cloud-run-domain.app/admin
I've set up targets using:
firebase target:apply hosting admin admin-site-in-firebase
firebase target:apply hosting api api-site-in-firebase
Here's my firebase.json (with the api-dev portion stripped out just for clarity):
{
"hosting": {
"target": "admin",
"rewrites": [{
"source": "/admin/",
"run": {
"serviceId": "what_I_called_my_cloud_run",
"region": "us-east1"
}
}]
}
}
Sadly, it's not quite doing the right thing. It's showing a page not found error. I sense I'm close, but still a bit farther away than I'd like. Any pointers super helpful!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
