Giriş


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.


Hazırlık Adımları

1. Heroku Hesabı Oluştur

https://heroku.com adresinden kayıt ol.

2. Heroku CLI Kur

https://devcenter.heroku.com/articles/heroku-cli adresinden indir ve kur.

$ heroku login

3. Git Deposunu Hazırla

$ 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 Uygulaması Oluşturma

$ 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)