বৃহস্পতিবার, ১৭ নভেম্বর, ২০১৬

লারাভেল প্রজেক্ট হেরেকুতে ডিপ্লয় করবেন ?


  1. আপনার পিসিতে হেরেকুর কমান্ড লাইন টুল ইন্সটল করুন । তারপর opne comand line with ruby অ্যাপ ওপেন করি ।
  2. এইবার লারাভেল প্রজেক্ট ফোল্ডারে ডিরেক্টরি পরিবর্তন করি । e.g. c:\users\ cd d/ g:\laravel_blog\
  3. এইবার গিট ইনিসিয়ালাইজ করি আর add , commit করি। 
  1. $ git init
    Initialized empty Git repository 
    $ git add .
    $ git commit -m "new laravel project"
       4. এইবার Procfile ফাইল অ্যাড করি আর change commit করি।
 echo web: vendor/bin/heroku-php-apache2 public/ > Procfile
$ git add .
$ git commit -m "Procfile for Heroku"
[master 1eb2be6] Procfile for Heroku
 1 file changed, 1 insertion(+)
 create mode 100644 Procfile
       5.
 heroku create app_name

       6. Give proper email and password for your hereku account .
       7. Add build pack
 heroku buildpacks:set heroku/php
Buildpack set. Next release on app_name will use heroku/php.
Run `git push heroku master` to create a new release using this buildpack.
php artisan key:generate --show
$ heroku config:set APP_KEY=generated key 
git push heroku master
 heroku addons:add heroku-postgresql:hobby-dev (for adding database free)
 heroku config --app app_name (for getting database info in this format DATABASE_URL: postgres://USERNAME:PASSWORD@HOSTNAME:PORT/DATABASE)
Add this details to config/database.php and .env
then $
git add .
$ git commit -m "Updated database configuration"
$ git push heroku master

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন

How it feels like reading a book in a kindle reader?

Recently I have a amazon kindle reader as gift from my little brother. Though I am in temptation to have one for 3 years. One of my friend ...