3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

herokuにlaravelとMysqlの環境を構築する

Last updated at Posted at 2016-10-21

#herokuにデプロイする
herokuアプリを作成

heroku create [アプリ名] --buildpack https://github.com/heroku/heroku-buildpack-php
git add .
git commit -m ''
git push heroku master
heroku config:set APP_KEY=$(php artisan key:generate --show)

確認

heroku open

#Mysql
クレジットカードを登録(vプリカでも可)

heroku addons:add cleardb
heroku config

でCLEARDB_DATABASE_URLを確認

CLEARDB_DATABASE_URL: mysql://[DB_USERNAME]:[DB_PASSWORD]@[DB_HOST]/[DB_DATABASE]?reconnect=true

から

heroku config:set DB_USERNAME=[DB_USERNAME]

の様に設定していく

APP_ENV = heroku
LANG = ja_JP.UTF-8
TZ = Asia/Tokyo

これで完成

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?