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
Related
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?
I built a Meteor app, and it runs on my local machine, where I have meteor installed.
I have never deployed an app online, and am trying to put the app on heroku.
I first tried to use buildpack/jordansissel/heroku-buildpack-meteor.git, but I got an error "Meteor requires Node v0.10.41 or later"
I then tried to use buildpack/michaltakac/meteor-buildpack-horse.git but it failed to push because it couldn't unpack Node.
Lastly I've tried kevinseguin/heroku-buildpack-meteor.git but I get lots of warnings about npm depricated http://prntscr.com/bewzak
When I look at the logs it says "Slug compilation failed: failed to compile Node.js app"
I also get Error: MONGO_URL must be set in environment
I don't know enough to understand what the errors are, or how to get my app deployed
Image of errors: http://prntscr.com/bex0av
my goal it to get the site on gr-fireworks.herokuapp.com
I contacted Heroku helpdesk and they said they couldn't help me because the issue was outside the scope of Heroku Support.
I tried to reach out to Snap CI who said they were successful in deploying it, but when I try to type in exactly what they did, I am still getting the error about Node https://snap-ci.com/ankitsri11/Fireworks/branch/master/logs/defaultPipeline/1/Heroku?back_to=build_history
My repository I'm trying to deloy is on git at github.com/jschwarzwalder/Fireworks
From description of your problem I can conclude you need to do 2 things on your app's Heroku dashboard (Settings tab):
Add MONGO_URL environment variable that points to your Mongo DB database. You can create mongo instance on external service or use mLab Heroku addon (it has free plan).
So your environment variables may look like:
Also, you may need to add METER_SETTINGS if you use --settings settings.json and ROOT_URL - URL of you app gr-fireworks.herokuapp.com (is required).
Set this buildpack:
Ensure you have .git at the end of url.
Now you can deploy your app using single command (if you setup Heroku Toolbelt and heroku remote points Heroku's app repository):
$ git push heroku master
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)
I am trying to host my Express JS app on Heroku, I have uploaded it on my gitHub repo and associated it with my heroku account. I created the Procfile with content
web: node app.js
But when I go to my application link on Heroku it gives Application Error.
What I am doing wrong? Do I need to give my index.js instead of app.js?
I upgraded my git to 2.3.0 and now the logs are coming in. It seems the issue was that no web dynos were running.
I went in my terminal and did
heroku logs --app myappname
heroku ps:scale web=1 --app myappname
and now the application is working
I am new to heroku and I am trying to create an app and deploy, but when i do heroku create on CLI this creates a random name for the application. So I used heroku app:create project-name which created the application with the project-name but how do i deploy my existing code to that application.
If you've already performed heroku create without specifying a name in your application folder then you will already have a git remote named heroku. You can confirm this by doing
git remote -v
in your project folder which will probably show something like
heroku git#heroku.com:stark-taiga-7738.git (fetch)
heroku git#heroku.com:stark-taiga-7738.git (push)
When you then create an application specifying an application name then the existing remote will not get updated with the new application details.
To fix this you will need to remove the existing git remote named heroku and then add a new one pointed to the correct application.
git remote rm heroku will remove the existing remote
heroku git:remote --app <new app name> will create a new heroku remote pointing at your new application will then let you do git push heroku master and deploy to the correct application.
Heroku uses Git to deploy. Navigate to the home directory of your application and simply do
git push heroku master
See the documentation for deploying a node.js application to Heroku for details.