Heroku Manual Deployment for VoIP Suite #133
Replies: 1 comment
-
|
Here's how I worked this repair using Windows: First a Note: As a bit of a newbie to a lot of the services that are required to run this VoIPSuite, I had trouble figuring out what the error message that came from Heroku meant. But as it's explained nicely in this thread, it has to do with Heroku intentionally breaking "Automatic Deployments" from Github for security reasons. So, we now have to manually download the latest deployment from our Github account and then manually upload it to heroku. We will use GIT to handle the downloading, uploading and compiling. INSTALL GIT As a PC user, I chose "Git for Windows" and chose the 64 bit standalone installer from here: https://git-scm.com/download/win Before I ran the installer, I installed a 32-bit version of Notepad++: https://notepad-plus-plus.org/downloads/v8.3.3/ I did this because the GIT installer sort of asks for it. Then I installed Git for Windows (Git-2.36.0-64-bit.exe) and accepted all the defaults for all the questions it asked me during the install. This worked out fine. (when it asked which text editor I wanted to use, I chose Notepad++) Notepad++ turned out to be unnecessary, but it's not harmful, and that's what I did. INSTALL HEROKU curl https://cli-assets.heroku.com/install.sh | sh But I'm on Windows. Fortunately, Heroku has a CLI help page for other platforms: https://devcenter.heroku.com/articles/heroku-cli There is a link "First-time GIT setup" (a prerequisite to installing heroku CLI) git config --global user.name "John Doe" Since you have GIT installed, you are basically just writing these lines into the GIT config page on your PC. I opened up a command prompt with Administrative privileges. (as instructed) I then entered: git config --global user.name "John Doe" (I use [email protected] because it appears later in the instructions. You can use it too.) I later noticed that in the OP instructions to this thread, we actually set the global user email to [email protected]. So even though I set my config via the 2 lines above, I followed the rest of the instructions to the T. After making the tweaks to my GIT config, I downloaded and installed the 64 bit version of the Heroku CLI (heroku-x64.exe)> I got that file from the heroku help page referenced earlier: [(https://devcenter.heroku.com/articles/heroku-cli)] Now that the GIT and HEROKU CLIs are installed to your PC, you will issue commands via your Command Prompt terminal and these commands are understood and acted upon. GET YOUR FORK You are looking for these magic words: "This branch is up to date with 0perationPrivacy/VoIP:main." Why? You will be downloading from your github account, so you need to make sure what's stored in your repository is the latest copy of VoIPSuite. HEROKU LOGIN heroku login This causes the heroku website login page to open in a browser. Enter your heroku credentials. Get yourself logged in. next, go back to the command prompt and type the following (then hit RETURN or Enter) git config --global user.email "[email protected]" then type git clone https://github.com/yourGithubUserNameHere/VoIP.git obviously, replace yourGithubUserNameHere with your github username for example, if I log into Github, and want to get to MY FORK of the VoIPSuite, my URL is: https://github.com/JoeUser/VoIP JoeUser is my username That git clone command will download a copy of your fork of VoIPSuite via GIT into your PC. next type: cd VoIP and hit return that navigates us into the VoIP directory next type: git commit --allow-empty -m "Empty test commit" and hit return (you are running a little connection test to GIT) Next, you have to identify the receiving account on heroku for your coming upload You'll have to personalize the following code "template" or example a bit before using it. the code template is: heroku git:remote -a tidbit I will replace "tidbit" with a little bit of the URL of my VoIPSuite instance on Heroku. Specifically - if I want to use my VoIPSuite, I go to So, bada-BING is the "tidbit" that I would put into the code template. Example - the template: Just enter your app's name instead of tidbit or bada-BING and hit return You have just set the receiving account on heroku for your coming upload Next type git push heroku main --force and hit return. It will take a little time but this will upload and compile your app onto your heroku account. (Got an error? see below*) VOILA, you have now made heroku happy and your VoIPSuite is back in action. Thanks to to OperationPrivacy for this swell app. I hope these instructions are helpful to somebody.*Got an error? such as: You will get an error if this is not your first time doing this. That's because you have already creatged a VoIP folder inside C:\Windows\System32 and as a safety measure, GIT will not drop files in an existing GIT folder. Look into your PC. If you see see C:\Windows\System32\VoIP it's because that folder was created when you 1st GIT-downloaded your VoIPSuite repository. My fixit was to do the following, and in fact, this would be the succinct code I would run each time I needed to download and push an update of VoIPSuite from github to heroku. open command prompt with administrator privileges this puts all those repository files onto your PC here: now type next type: You may have to close any opened VoIPsuite browser tabs and log back in. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Background
In the wake of GitHub and Heroku being "hacked" and their OAuth tokens being stolen, you can no longer connect your GitHub account to Heroku for automatic deployments as it authenticates using GitHub tokens. This should be temporary.
If you've already connected Heroku to GitHub before this incident, your GitHub account will remain connected but you still cannot use automatic Deployments. So when you update your forked repo, the Heroku app will not automatically pull the new code. Instead, the workaround is to manually push the code to the Heroku instance if you need to update your app.
Updating Repo
When an update comes, you will follow the same procedure of first updating your fork by clicking on
Fetch Upstream>Fetch and MergeHere's where the new workaround starts:
Manually Updating App
You need to manually push the updated code to your Heroku instance for the time being.
Take the following commands and copy it in your text editor for quick copy/pasting. You will copy/paste only 2 chunks of code and you should be done.
Download the txt file: Heroku-Manual-Deploy.txt
From the above, change 2 things:
MyVoIPSuiteto the name of your actual application found in Heroku under https://dashboard.heroku.com/appsActivitytab.The next time you want to update your code, you only have to:
cdinto theVoIPfoldergit pullgit push Heroku main --forceBeta Was this translation helpful? Give feedback.
All reactions