

On the first deployment, all dependencies will be downloaded, which takes a while to complete (but they will be cached for future deployments). Heroku will run sbt stage to prepare your application. Remote: -> Dropping compilation artifacts from the slug

Remote: -> Dropping sbt boot dir from the slug Remote: -> Dropping ivy cache from the slug Remote: -> Priming Ivy cache (Scala-2.11, Play-2.4). To deploy your application on Heroku, use Git to push it into the heroku remote repository: $ git push heroku main The Git endpoint is set as a new remote named heroku in your Git repository’s configuration. This provisions a new application with an HTTP (and HTTPS) endpoint and Git endpoint for your application. §Create a new application on Heroku $ heroku createĬreating warm-frost-1289. §Deploying to a remote Git repository §Store your application in git $ git init There are two methods of deployment to Heroku: Heroku is a cloud application platform – a way of building and deploying web apps.

GIT ADD REMOTE FOR HEROKU UPDATE
It’s not documented anywhere, at least I could not find it, but I imagine that Github sends a Webhook to Heroku to trigger the deployment (remember we set it to auto-deploy from the main branch).Īnd here it is… Our app has been deployed automatically to Heroku.Īs we did in the previous blog posts, we will also update our application just to see how it works. Next, login to your Heroku account, In the Overview tab you will see that your app is being deployed. You’ll see the files in your Github repository. Total 13 (delta 0 ), reused 0 (delta 0 ), pack-reused 0 ~/Flask-Basic-CICD-Heroku ❯ git push origin main ~/Flask-Basic-CICD-Heroku ❯ git commit -m "Adding application" Adding applicationĬreate mode 100644 app/_pycache_/Ĭreate mode 100644 app/templates/index.html Next, we need to sync our local application to the remote Github repository. The Heroku Git option was covered in this post while the Github option is what is covered in this post. Take a good look at the ‘Deployment Method’. Go to the Deploy tab and connect yout Github repository: Next, login to the Heroku platform with your account and create a new app just as I did in below screenshot. Total 3 (delta 0 ), reused 0 (delta 0 ), pack-reused 0 ~/Flask-Basic-CICD-Heroku ❯ git push origin mainEnumerating objects: 3, done. ~/Flask-Basic-CICD-Heroku ❯ git remote add origin ~/Flask-Basic-CICD-Heroku ❯ git commit -m "Initial commit" Initial commit ~/Flask-Basic-CICD-Heroku ❯ git add README.md ~/Flask-Basic-CICD-Heroku ❯ git branch -m main Initialized empty Git repository in /Flask/Flask-Basic-CICD-Heroku/.git/
GIT ADD REMOTE FOR HEROKU CODE
In my case, it’s called flask-basic-cicd-heroku.Īnd we go ahead and sync our local application code towards our Github repository. If you have been reading through my previous “how to deploy a Flask application” posts, you’ll know we start off with configuring a Github repository for our application. Let’s get started! Configure Github repository With the Heroku-Github integration, we commit our code to Github which will trigger a deployment onto the Heroku platform. With heroku git, we commit our code directly to Heroku git. In this post, we will make use of the existing Heroku - Github integration (not Heroku git). It’s not so much different compared to previous posts but well worth to dedicate a seperate post to it. In this post, we used Github and Github Actions to deploy our application onto Heroku.īut there’s a different way still I want to touch on. In fact, we simply committed our code directly to Heroku git. In this post, we deployed a basic Flask application to Heroku by making use of the built in git functionality. Yet another post on deploying a Flask App? Again on the Heroku platform? Yes, but using again a slightly different method.
