Skip to content

Instantly share code, notes, and snippets.

@luisenricke
Last active June 15, 2019 19:41
Show Gist options
  • Save luisenricke/b1fef323314b8a6d30c934939f91c91d to your computer and use it in GitHub Desktop.
Save luisenricke/b1fef323314b8a6d30c934939f91c91d to your computer and use it in GitHub Desktop.
Ejemplo de como deployar en Heroku un proyecto de Laravel

git clone git@github.com:jcc/blog.git && cd \ && composer install && npm install
cp .env.example .env
Cambiar la paqueteria de fzaninotto/faker a requerido
fzaninotto/faker
composer update && npm run production
echo web: vendor/bin/heroku-php-apache2 public/ > Procfile
Eliminar las cosas de gitignore
heroku create
heroku buildpacks:add heroku/php
php artisan key:generate --show
heroku config:set APP_KEY=
heroku config:set APP_URL=
heroku config:set APP_DEBUG=true
heroku addons:create heroku-postgresql:hobby-dev
heroku config:set DB_CONNECTION=pgsql
heroku config:set DB_HOST=
heroku config:set DB_DATABASE=
heroku config:set DB_USERNAME=
heroku config:set DB_PASSWORD=
Configurar la base de datos como la pagina https://appdividend.com/2018/04/17/how-to-deploy-laravel-project-on-heroku/
Cambiar las cosas del seed y configuraciones del blog
git add . && git commit -m "Deploy" && git push heroku master
heroku run bash
/heroku run/ php artisan migrate:install
/heroku run/ php artisan migrate:refresh
/heroku run/ php artisan db:seed
/heroku run/ php artisan passport:install
/heroku run/ php artisan storage:link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment