{"id":15025667,"url":"https://github.com/jessedc/laravel-heroku-example","last_synced_at":"2025-04-09T20:04:07.181Z","repository":{"id":138948045,"uuid":"79860789","full_name":"jessedc/laravel-heroku-example","owner":"jessedc","description":"Laravel 5.6 project setup for easy Heroku deployment","archived":false,"fork":false,"pushed_at":"2018-11-04T22:19:46.000Z","size":322,"stargazers_count":40,"open_issues_count":0,"forks_count":40,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T20:04:02.729Z","etag":null,"topics":["heroku","heroku-laravel","laravel","laravel-framework","laravel56","php","php7","php71","postgres"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jessedc.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-23T23:48:29.000Z","updated_at":"2022-07-18T08:26:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"727da2e7-6404-4b6f-9f35-d117a30b9e5d","html_url":"https://github.com/jessedc/laravel-heroku-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedc%2Flaravel-heroku-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedc%2Flaravel-heroku-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedc%2Flaravel-heroku-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedc%2Flaravel-heroku-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jessedc","download_url":"https://codeload.github.com/jessedc/laravel-heroku-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103865,"owners_count":21048245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["heroku","heroku-laravel","laravel","laravel-framework","laravel56","php","php7","php71","postgres"],"created_at":"2024-09-24T20:02:48.959Z","updated_at":"2025-04-09T20:04:07.171Z","avatar_url":"https://github.com/jessedc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Heroku Laravel Example\n\nThis is boilerplate Laravel 5.7 project similar to what the `laravel new` or `composer create-project` commands create.\n\nThis project can be used as is as a shortcut to deploying a Laravel 5.6 app on heroku, or used as a guide.\n\n## Heroku Specific Configuration\n\n- [Procfile](https://devcenter.heroku.com/articles/procfile) defining a web process using nginx and a worker process for running queues\n- Database configuration defaults set to use Postgres and to parse heroku-postgres `DATABASE_URL` environment variable\n- Redis configuration setup to use heroku-redis `REDIS_URL` environment variable\n- Failed job database configuration defaulting to postgres\n- A heroku app.json and post-deployment script (`php artisan postdeploy:heroku`)for use with Heroku Review Apps\n- TrustedProxies middleware configured to trust Heroku load balancers correctly\n- npm task named \"postinstall\" that is run during heroku deployments\n- Heroku specific logging configuration set as the default.  \n\n## Additional Configuration\n\n- Pinned to PHP 7.2 (`~7.2.0`)\n- Setup with bootstrap scaffolding (`php artisan preset bootstrap`)\n\n## Local Development\n\n**1. Database, app key, .env**\n\nClone this repository and run the following commands:\n\n```bash\ncomposer install\ncp .env.example .env\ntouch database/database.sqlite\nphp artisan key:generate\nphp artisan migrate\nnpm install \nnpm run dev\n```\n\n**2. Run**\n\n```bash\nphp artisan serve\n```\n\n## Deploying to Heroku\n\n**1. Create a Heroku app**\n\nCreate an app name\n\n```bash\napp_name=heroku-laravel57-test-app\n```\n\nCreate Heroku app\n\n```bash\nheroku apps:create $app_name\nheroku addons:create heroku-postgresql:hobby-dev --app $app_name\nheroku addons:create heroku-redis:hobby-dev --app $app_name\nheroku buildpacks:add heroku/php --app $app_name\nheroku buildpacks:add heroku/nodejs --app $app_name\n```\n\n**2. Add Heroku git remote**\n\n```bash\nheroku git:remote --app $app_name\n```\n\n**3. Set config parameters**\n\nFor Laravel to operate correctly you need to set `APP_KEY`:\n\n```bash\nheroku config:set --app $app_name APP_KEY=$(php artisan --no-ansi key:generate --show)\n```\n\nSet Queues, sessions and cache to use redis\n\n```bash\nheroku config:set --app $app_name QUEUE_CONNECTION=redis SESSION_DRIVER=redis CACHE_DRIVER=redis\n```\n\nOptionally set your app's environment to development\n\n```bash\nheroku config:set --app $app_name APP_ENV=development APP_DEBUG=true APP_LOG_LEVEL=debug\n```\n\n**4. Deploy to Heroku**\n\n```bash\n git push heroku master\n```\n\n**5. Run migrations**\n\n```bash\nheroku run -a $app_name php artisan postdeploy:heroku\n```\n\n---\n\n## License\n\nThe Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessedc%2Flaravel-heroku-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjessedc%2Flaravel-heroku-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessedc%2Flaravel-heroku-example/lists"}