Bu bölümde Microblog uygulaması Heroku bulut platformuna dağıtılıyor. Heroku bir PaaS (Platform as a Service) sağlayıcısıdır; donanım, işletim sistemi, veritabanı ve web sunucusu gibi altyapı bileşenlerini sizin yerinize yönetir. Tek yapmanız gereken uygulamayı git push ile göndermektir.
⚠️ Heroku ücretsiz katmanını kaldırmıştır. Bu bölümü denemek küçük bir ücrete yol açabilir. Deneyi bitirince uygulamayı silmeniz önerilir.
https://heroku.com adresinden kayıt ol.
https://devcenter.heroku.com/articles/heroku-cli adresinden indir ve kur.
$ heroku login
$ git clone <https://github.com/miguelgrinberg/microblog>
$ cd microblog
$ git checkout v0.18
Kendi projeniz için:
$ git init .
$ git add .
$ git commit -m "initial commit"
$ heroku apps:create flask-microblog
Bu komut Heroku üzerinde uygulama oluşturur ve yerel git reposuna heroku adında uzak (remote) ekler:
$ git remote -v
heroku <https://git.heroku.com/flask-microblog.git> (fetch)
heroku <https://git.heroku.com/flask-microblog.git> (push)