Skip to content
This repository has been archived by the owner on Oct 19, 2019. It is now read-only.
/ laravel-volunteer Public archive

Exploring Laravel by building a simple BREAD website. A simple Craigslist clone.

License

Notifications You must be signed in to change notification settings

azdanov/laravel-volunteer

Repository files navigation

Laravel Volunteer · PRs Welcome GitHub license

Exploring Laravel by building a simple BREAD website. Live.

Laravel Volunteer Screenshot

Getting started

Read how to setup Docker / Homestead.

Or use Valet and locally installed dependencies.

Dependencies

Services

These services are required for using the searching and payment functionality in this demo.

Installing

Composer and Yarn are required to install and bundle the dependencies.

By default sqlite is enabled in the .env for a faster start in development. Similarly redis is disabled for queues, session, etc.

composer install

cp .env.example .env
touch database/db.sqlite

php artisan key:generate
php artisan migrate
php artisan db:seed

yarn
yarn dev

Deployment on Heroku

The demo can be hosted on Heroku in such a way.

For this example the demo is named: my_demo_name.

  1. Install Heroku-CLI
  2. Provision Heroku add-ons and build-packs:
    heroku apps:create my_demo_name
    heroku addons:create heroku-postgresql:hobby-dev --app my_demo_name
    heroku addons:create heroku-redis:hobby-dev --app my_demo_name
    heroku buildpacks:add heroku/php --app my_demo_name
    heroku buildpacks:add heroku/nodejs --app my_demo_name
  3. Add Heroku to git remote:
    heroku git:remote --app $app_name
  4. Set environmental variables on Heroku:
    heroku config:set --app my_demo_name APP_KEY=$(php artisan --no-ansi key:generate --show)
    heroku config:set --app my_demo_name QUEUE_CONNECTION=redis SESSION_DRIVER=redis CACHE_DRIVER=redis SCOUT_QUEUE=true
    
    heroku config:set --app my_demo_name BRAINTREE_ENVIRONMENT=sandbox
    heroku config:set --app my_demo_name BRAINTREE_MERCHANT_ID=<id>
    heroku config:set --app my_demo_name BRAINTREE_PUBLIC_KEY=<key>
    heroku config:set --app my_demo_name BRAINTREE_PRIVATE_KEY=<key>
    
    heroku config:set --app my_demo_name ALGOLIA_APP_ID=<id>
    heroku config:set --app my_demo_name ALGOLIA_SECRET=<secret>
    heroku config:set --app my_demo_name MIX_ALGOLIA_CLIENT_ID=<id>
    heroku config:set --app my_demo_name MIX_ALGOLIA_CLIENT_KEY=<key>
    heroku config:set --app my_demo_name MIX_ALGOLIA_CLIENT_INDEX=<index>
  5. Deploy to Heroku
    git push heroku master
  6. Run demo migrations
    heroku run -a my_demo_name php artisan migrate
    heroku run -a my_demo_name php artisan db:seed
  7. Enable debugging (Optional, be sure not to run this on production, and prune telescope entries regularly)
    heroku config:set --app my_demo_name APP_ENV=development APP_DEBUG=true APP_LOG_LEVEL=debug TELESCOPE_ENABLED=true

Any issues during deployment are usually because of wrong env variables for external services (redis, postgres, braintree, algolia, algolia client).

License

MIT

About

Exploring Laravel by building a simple BREAD website. A simple Craigslist clone.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published