Can you move a firebase hosting site to a different project? - firebase

So, I was wondering, is it possible to move a firebase hosting site to a different project?.
I searched through the documentation, but I dont see anything anywhere that says how to do it, or if it is even possible

There is no built-in operation to move to a new project. But if you're deploying with the Firebase CLI, you can run:
firebase use <new project ID>
And then:
firebase deploy
To deploy the same content to the other project.

If you have your code for the site then you can just create a new folder and use firebase init hosting and initialize hosting in new project.
After that the process of deploying remains the same i.e.
firebase deploy --only hosting
PS: Also if you are using any custom domains, you would have to verify the ownership of the domain again in the new project.

Related

Unable to deploy to firebase hosting

I deployed to firebase hosting,
after that
I want to delete the duplicate deployed
but I couldn't find a way to delete the hosting
so what I did,
I used firebase deploy hosting:disable sample-project
and I deleted all rollback in the console
now I have no way to re-deploy it.
any one knows how to revive my google deploy?
or the only way to revive it is just create another project and abandon this one ?

Firebase Hosting - Store projectId in git version control

One can select a project to deploy their app to, using firebase use PROJECT_ID.
I've an interesting pattern - I've multiple firebase hosted applications (projects) on the different branches of a git repo, and I often need to switch between them. When I issue firebase deploy, often it picks the wrong project and deploy there.
Is there a way to configure the projectId for firebase hosting within my code, so that when changing branches, the right project is automatically selected for deployment?
Thank you.

Can firebase "deploy access" be restricted?

We are bringing in a new developer for our Firebase web app project, who will start out by just learning the code in his local environment.
Since the new developer will be running Firebase CLI in the local env., is there a way to set up his initial role on the project such that he is [not able] to run firebase deploy commands?
~~~~~~~~~~~~~~~~~~~~~~~~~
I did find this doc from Google:
https://cloud.google.com/iam/docs/understanding-roles?_ga=2.49153190.-1888993.1468450573#curated_roles
It discusses deploy access in section: App Engine Roles .. not sure if that is for Firebase as well.
If so, are there any additional references for how to go about applying these kinds of roles to a Firebase project?
Anyone who has the "editor" or "owner" role for a project will be able to deploy (and generally make any other changes to the project). If you don't want an account to be able to deploy, don't give either of those roles.

How to deploy google firebase functions using cmd?

I have a problem with a web hosting project. I created a new proyect in google firebase, and I executed the following commands:
C:\myproject>firebase init functions
C:\myproject>firebase deploy --only functions
But the site says this:
Site Not Found
Why am I seeing this?
There are a few potential reasons:
You haven't deployed an app yet.
You may have deployed an empty directory.
This is a custom domain, but we haven't finished setting it up yet.
How can I deploy my first app?
Refer to our hosting documentation to get started.
What could I do for show, at least, some text when an user go to my project url?
The way you now invoke the Firebase CLI, it will only deploy the Cloud Functions in your project. It will not deploy the web site. In fact, the way you've run it, it probably didn't even create a web site to deploy.
Initialize the project with:
firebase init
And answer the questions this shows.
If you want to deploy the web site, use:
firebase deploy --only hosting
More likely you should simply deploy everything to prevent running into this problem:
firebase deploy

How do I deploy the polymerfire demo to firebase?

I want to try the demo for polymerfire in firebase. To get it run locally I followed these steps. But what exact steps do I need to do to get it to run in firebase?
I figured firebase init and firebase deploy should be run but the browser only displays errors in the console. Must the polymer project be build in a certain way and what should the firebase "public" folder be?
All files from public folder will be deployed to your Firebase static web hosting, so you can access them though your Firebase hosting address like https://projectname-5gek53.firebaseapp.com/. This allows you to upload your web app.
You build your polymer app (I guess you need to run polymer build). You drag all files generated as production build to your public folder. Next, you run firebase deploy and after deployment process your app will be accessible from your hosting address as I mentioned above.
Edit: Polymerfire demo is actually not that simple to export, but I found a really nice tutorial step-by-step from Google Codelabs here is a link Build a Progressive Web App with Firebase, Polymerfire and Polymer Components
I just installed a new version of the polymer cli and Firebase cli. When I do a Polymer build, no build/bundled or build/unbundled is created.
I do get a build/default, which I can run with a firebase serve and a firebase deploy. So something has changed recently. just fyi

Resources