I read the Cloud Fucntions docs and successfully deployed and it's working great. In my Firebase I have two projects, debug and production and they have different package names.
I can't find out how to deploy the function to my production project only to the debug project. Where do I change the target for deploy since I am singed in using google into Firebase and the projects debug/production is there.
You need to add the other project first. Open a terminal in your functions folder (not in the subfolder functions) and write firebase use --add after that you can select the project via firebase use YourProjectName
Related
I'm contributing to a React Native project that uses firebase-functions. In the Functions section of the Firebase Console there's a list of existing functions, and I want to know how to add a new one. I know what code I want to write, but I don't know how to deploy it to Firebase so that it will appear in this Functions section of the console. A tutorial I saw said to use firebase deploy, but when I do that within my project it says function 'firebase' not found. Is there another way to add the functions to the console?
When you deploy Cloud Functions through the Firebase CLI by running firebase deploy or firebase deploy --only functions, any successfully deployed functions automatically get added to the Firebase console.
There is no separate step to get them added, nor any way to add Cloud Functions through the Firebase console. Just run firebase deploy and they will show up.
I am currently working on a project that uses Angular as frontend framework, Flask as backend framework and MySQL as database.
Furthermore, the developement of the application is completed and the source code is stored in private Github repo.
My next step is to deploy this project on heroku server. After done some research l found that i have to change the database to Clear DB which is the database available in heroku. As a newbie this is my first web app deployment to heroku server.
Is there any online source where i can refer that can fullfiill my requirement or if somebody has done this approach previousely could please list down the steps so i can follow them. Your help will be highly appreciated.
Thanks and best regards.
I had done a project related to angular and flask. I faced the same issue when it comes to app deployment phase.
I deployed the angular app and the flask app in two separate heroku servers. Using this method it is easy for you to do the furthure developments of the application as well.
Following are some reliable sources you can refer,
Deploy flask app to heroku
https://stackabuse.com/deploying-a-flask-application-to-heroku/
Deploy angular app to heroku
https://www.javaguides.net/2020/11/how-to-deploy-angular-application-to-heroku.html?m=1
After deploy both these frameworks separately you can replace your angular api call from https://localhost:5000/api/ to https://yourbackendserver.herokuapp.com/api/
Sometimes it happens that when we do a deploy, the last committed files with extension cshtml, are not updated. We have not seen other type files being not updated. It could be that a file is in use and can't be overwrited. Is it possible to add an extra step to the deployment process so we can avoid this?
That is strange. If you are using the Azure App Service Deploy task within Azure Pipelines to deploy to your Web App, you have the option to Remove additional files at destination. Enabling this option deletes files in the Azure App Service that have no matching files in the App Service artifact package or folder being deployed.
Based on the chosen deployment method, there are other helpful additional deployment options like:
Rename locked files: Rename any file that is still in use by the web server by enabling the msdeploy flag MSDEPLOY_RENAME_LOCKED_FILES=1 in the Azure App Service settings. This option, if set, enables msdeploy to rename files that are locked during app deployment. This way, you can avoid deployment failures with ERROR_FILE_IN_USE errors.
Take App Offline: Select this option to take the Azure App Service offline by placing an app_offline.htm file in the root directory before the synchronization operation begins. The file will be removed after the synchronization completes successfully.
Having these in place can streamline your deployments and make them robust. Here is the complete reference for the task: Azure App Service Deploy task.
I have a google workspace addon which is extending gmail and is using app script oauth to connect our own system, https://github.com/googleworkspace/apps-script-oauth2.
Our system has a development environment and a live environment, each uses a different identity client id secret which need to be used when connecting to each. I have stored these as different project properites with the development properties being prefixed with 'dev-' and i have a function that looks like this:
getScriptPropery function. This function has a variable that should let me change the script properties I access.
I have then created a versioned deployment that uses the live project properties and have kept my HEAD deployment using the develpoment properties. My problem is that once someone tries to login on the versioned deployment they seem to be redirected back to the HEAD version of the code which is using development project properties, this then breaks the login attempt and gives the following error: AppScript login error. I have tested this by adding logging that is only in the HEAD version of the getScriptProperty function and you can see the logs swap to using the development properties after redirecting from the login attempt, Logging example.
Is there a better way to manage deployments/project properties to stop this from happening or have a just missed something with how they are meant to work?
In the past I have been using batch files to prepare release packages targeting different environments such as test, staging and production, and then copy the files to the Web site folders through various means. The batch files may run XmlPreProcess to alter web.config for different environments.
Lately I am trialing the Publish Web feature of VS 2012, after installing Web Deploy 3 in the server side. The result is looking good for Hello World.
However, I have a WCF app: MyWcfApp.dll had dependency on MyWcfContracts.dll and MyWcfImplementation.dll which depend on MyData.dll and MySql.Data.dll, yes, I am using MySql. All these files appear in the build folder, say MyWcfAp\bin\Debug.
When running Publish Web, I got some warning: The database provider for this connection string, MySql.Data.MySqlClient, is not supported for incremental database publishing. Incremental database publishing is supported only for SqlClient as well as Entity Framework Code First models.
Then the other dependent assemblies such as MySql.Data.dll got not copied over to the server.
Apparently Publish Web does a lot "smart" things through analyzing Web.config and having a lot presumptions.
Question 1:
Is it good to use Publish Web to deploy WCF service?
Question 2:
Is it possible to run some pre-deployment script say running XmlPreProcess before the deployment so I could target different environments?
Question 3:
Is it possible to ask Publish Web not to analyze Web.config and then just copy every assemblies and files in the build folder?
For the specific issue (Question 3) of not copying over dependent-upon assemblies:
I am working with a small WCF Service Application that I am deploying to my local file system (then hosting the site in IIS) and had the problem of depended-upon assemblies not being copied to the local folder. The solution for me had two steps:
In the service's References, hi-light each reference you need to be copied and hit F4. In the new window make sure 'Copy Local' is set to 'true'.
Right click on the Service Project and select properties. Click the 'Package/Publish Web' section, and from the 'Items to deploy...' dropdown select 'All files in this project folder'.