Unable to deploy update a react app to app service - azure

I have a react app running on an app service, I have already updated the app multiple times through the Azure vsCode extension. Now if I try to deploy a new version the output window on the extensions gives out the next message:
Error: Failed to get status of deployment.
And there is nothing in the deployment center logs on the app service portal.
The app service uses a Local Git as source so I tried deploying manually to the git building the app myself and using the commands
git remote add azure "my Git Clone Uri"
git push azure master --force
But this gives the next output
And again nothing on the deployment center logs.
I used to be able to deploy my react app this 2 ways but now I can't. Is there any other way to deploy or to know what is going wrong with either the manual push or the VScode extension?

Related

Permission denied on deploying react web app on azure

I am deploying a react web app on azure by creating a workflow on github.
Now after committing changes it shows an error on creating build as:
The same error occured when I was deploying it using surge.sh
Can anyone help me out?
It seems to be a problem related to the Node.js module in your repository. Therefore, I suggest you do the following
Part 1: Reinstall the Node module
yarn uninstall
yarn install
Part 2: Redeploy the project via GitHub Action
Part 3: Deploy the React app directly from Azure Portal
Adding to Mark's response. Try the following steps to further narrow-down the issue:
-Please check if there is a .deployment file in the root of the repository, and provide this file if present, along with the deploy._ file if present (deploy.cmd, deploy.sh, deploy.ps1).
-Just to isolate, test the deployment directly from your local Git repository to a new App Service.
--If a .deployment and deploy.sh file are included in the root directory of the app code, Kudu will use the legacy build to run the commands specified in the deploy.sh script.
--Just to highlight on this, Kudu is the engine behind Git deployments on both Windows and Linux. By default, App service uses Oryx to build/install and Kudu will determine type of stack is used and creates a generic deploy.sh script to install the packages.
-App Service sets the environment variable PORT in the Node.js container, and forwards the incoming requests to your container at that port number. your app should listen to that port using process.env.PORT
const port = process.env.PORT || 3000
1.Add a start-up script: Add the PM2 configuration file or your script file
2.Go to Azure Configuration>General Settings
If your build folder is at the root of the project:
Start up command: pm2 serve /home/site/wwwroot --no-daemon --spa
Certain web frameworks may use custom startup scripts when running in production mode.
Refer this doc Customize build automation for more details.

what happens when the command gcloud app deploy --version v1 is issued to deploy a nodejs application?

Can any one help me understand gcloud app deploy? I tried deploying an application but it gave me the error:
ERROR: (gcloud.app.deploy) Error Response: [13] An internal error
occurred while creating a Google Cloud Storage bucket.
Thanks,
-VR
gcloud is google sdk command to interact with its cloud services, you can read more about it here https://cloud.google.com/sdk/gcloud/
you can run gcloud commands either by installing gcloud sdk or from a gcloud shell where sdk is pre-installed.
gcloud app deploy looks for app.yaml which can be configured based on this documentation https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml
To address the error try running this command gcloud config set app/use_deprecated_preparation True; and give a try.
once we run gcloud app deploy --version v1 a version of the application is created and can be accessed by the corresponding url from version column.
one can even login to the running instance of VM by accessing respective instance ssh.
this command will tar ball the folder containing app.yaml and will be used to create the running nodejs instance; the entire deployment depends on PORT being used as part of NodeJS application for running production instance, and a proper package.json which will have all the dependencies listed and contains a start script to run the application.


Deploying Polymer 2.0 project to Microsoft Azure web app

I have followed basic docs and created a very basic Polymer web app and now I want to deploy it to my Azure Web App. I know VS 2017 provides easy way to just right click and deploy web apps with its built in templates, but in this case I created a project with polymer cli. So I don't really have an option to deploy it that way.
The following is the link of the docs on the page where they explain how to deploy on other platforms:
https://www.polymer-project.org/2.0/start/toolbox/deploy
If you are using Git, you're able to deploy the Polymer project to Azure Web App with following steps.
1. Build your project
Go to the root of your Polymer app and run the following command:
polymer build --bundle
2. Commit your content
Set up a repository by running the following command under \build\default folder:
git init
Use the following command to add files to your repository:
git add -A
Next, commit the changes to the repository by using the following command:
git commit -m "Hello Azure App Service"
3. Follow the steps from this documentation to enable the App Service app repository.
4. Deploy your project
In your app's blade in the Azure Portal, click Settings > Properties for the Git URL.
Use git remote to add the remote reference listed in Git URL. Your command will look similar to the following:
git remote add azure https://<username>#<appname>.scm.azurewebsites.net/<appname>.git
Push your content to App Service using the new azure remote you just created.
git push azure master
Now, you can visit your app on the browser.

Codeship doesn't deploy to Heroku

I'm using Codeship to deploy my NodeJS app (hosted on bitbucket) to Heroku.
In Codeship I chose heroku and added my Heroku API Key and also the name of the app on Heroku. But when I push to bitbucket and look at the log in codeship, there's no sign of deploying to Heroku and it finishes the job successfully in green zone after doing npm install
Is there any other script I have to add? Is there any command in CLI I have to run?
Answer:
Actually, as mlocher mentioned in his comment, I had to define specifically the branch that triggers the deployment pipeline. (in my case master)

Create and deploy app on Heroku from Nodejs app

I have a Node web app that can take commands from users. One command allows the user to do the following:
Create Heroku app
Deploy the app using the code from GitHub
Manually, I can deploy the app using command like "heroku create" and "git push heroku master". I would like to do these steps automatically from a Node app.
You should use Node's Heroku client library:
https://github.com/heroku/node-heroku-client

Resources