Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Heroku Basic Setup
- ### Initialize Heroku
- Assuming Heroku is installed
- ```
- touch Procfile
- echo 'web: vendor/bin/heroku-php-apache2 public' > Procfile
- ```
- ```
- heroku login
- heroku create
- heroku buildpacks:set heroku/php
- ```
- ```
- heroku config:add APP_ENV=local
- heroku config:add APP_DEBUG=true
- heroku config:add APP_KEY=...
- heroku config:add APP_URL=...
- ```
- ### Add Source Control
- ```
- git init
- git add .
- git commit -m "Initial commit"
- git push heroku master
- git remote add origin git@github.com:**********/****.git
- git push -u origin master
- ```
- ### Migrations
- Heroku -> Resources -> Add Heroku Postgres -> Choose the free plan -> Navigate to the Postgres dashboard and copy credentials
- ```
- heroku config:add DB_CONNECTION=pgsql
- heroku config:add DB_HOST=...
- heroku config:add DB_PORT=...
- heroku config:add DB_DATABASE=...
- heroku config:add DB_USERNAME=...
- heroku config:add DB_PASSWORD=...
- heroku run php artisan migrate
- ```
- Add the credentials to Postico as well
- ### Maintencance
- ```
- heroku maintenance:on
- heroku maintenance:off
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement