More often than not, a project requires multiple environments to deploy to. What I commonly use on top of my development environment is a staging e...
For further actions, you may consider blocking this person and/or reporting abuse
Nice post!
I started down the path of creating a staging project for one of my apps, but this was right when multiple sites were introduced to hosting and I saw in the docs that's the suggested way of doing this. I think the biggest obstacle I had was getting the database connection right when swapping back and forth between environments. I'll have to go back and see how I did that. I imagine you avoid that completely with this approach.
Thanks! Each environments has itβs own database, storage etc... I use environment variables in my Gitlab pipelines to build the app with the right environment before deploying to Firebase. I have planned another post covering how I use Gitlab to deploy to Firebase, stay tuned!
Nice, I do something similar Gitlab to build and package but Octopus Deploy to deploy. Also got a blog in the making on the second part.
Nice! Let me know when your post is ready, Iβd love to read it!
What if you have multiple sites in each of those projects?
like "admin" and "shop" for example.
No guide on the Internet I've looked at so far has show how to do this.
It's always either 1) one project with multiple sites or 2) 2 projects with one site each.
You can create multiple sites in the same Firebase project, and leverage the Deployment Targets feature. There is more information here: firebase.google.com/docs/hosting/m...
Thank you, yes I got it working.
Multiple projects with multiple apps in each project. It was a bit weird to get working though, but finally managed.
Thanks
Really interesting!
When you said "Use two completely different projects" you mean 2 seperate Firebase projects? I recently ran into the project cap (with only 3 active projects) and it wouldn't let me create another one. Google cleared it up quickly and gave me more but now I'm afraid of creating lots of projects now.
I usually use the Blaze plan and I never ran into the project limit myself.
An alternative if you are concerned about the project limit, would be to use Deploy Targets within the same project.
I think it was a weird thing with my Google account, I had 3 projects total and when I tried to create a new one it told me I have '-4 projects left', 2 of them were on Blaze
Thanks for that link I'll look into that. π
Strange behaviour indeed. Seems like Firebase has a hidden limit on the number of projects you can create, but no information on what that limit actually is π€