Skip to content

viacheslavpleshkov/laravel-graphql

Repository files navigation

laravel-graphql


🎼 Laravel 5.7 Framework using GraphQL

Installation Dev (Vagrant)

  1. Clone the repo and cd into it
  2. Run this command vagrant box add laravel/homestead
  3. Run this command composer install
  4. Run this command Mac / Linux bash init.sh or Windows init.bat
  5. Rename or copy .env.homestead file to .env
  6. Set your amazon s3 credentials in your .env file
  7. Set your algolia credentials in your .env file
  8. Set your pusher credentials in your .env file
  9. Run this command php artisan key:generate
  10. Run this command php artisan config:cache
  11. Run this command vagrant up
  12. Run this command vagrant ssh
  13. Run this command cd home/vagrant/code/
  14. Run this command php artisan migration
  15. Run this command php artisan db:seed
  16. Run this command yarn install
  17. Run this command yarn run dev
  18. Visit laravel-graphql.test in your browser

Installation Dev

  1. Clone the repo and cd into it
  2. Create users and table in PostgreSQL
  3. Run this command composer install
  4. Rename or copy .env.example file to .env
  5. Run this command php artisan key:generate
  6. Run this command php artisan passport:install
  7. Set your database credentials in your .env file
  8. Set your mail credentials in your .env file
  9. Set your APP_URL in your .env file
  10. Set your APP_DEBUG in your .env file with the value true
  11. Set your GRAPHQL_PLAYGROUND_ENABLED in your .env file with the value true
  12. Run this command php artisan config:cache
  13. Run this command php artisan db:seed
  14. Run this command php artisan serve or use Laravel Valet or Laravel Homestead
  15. Visit localhost:8000 in your browser

Installation Production

  1. Clone the repo and cd into it
  2. Create users and table in PostgreSQL
  3. Configure Nginx with these settings nginx.conf
  4. Run this command composer install
  5. Rename or copy .env.example file to .env
  6. Run this command php artisan key:generate
  7. Run this command php artisan passport:install
  8. Set your database credentials in your .env file
  9. Set your mail credentials in your .env file
  10. Set your APP_URL in your .env file
  11. Set your APP_DEBUG in your .env file with the value false
  12. Set your GRAPHQL_PLAYGROUND_ENABLED in your .env file with the value true
  13. Run this command php artisan config:cache
  14. Run this command php artisan db:seed

Deploying to Heroku

  1. Clone the repo and cd into it
  2. Run this command heroku create
  3. Run this command heroku buildpacks:set heroku/php
  4. Run this command heroku buildpacks:set heroku/nodejs
  5. Run this command heroku addons:create heroku-postgresql:hobby-dev
  6. Run this command heroku config:set APP_NAME=Laravel GraphQL
  7. Run this command heroku config:set APP_ENV=production
  8. Run this command heroku config:set APP_KEY=secret
  9. Run this command heroku config:set APP_DEBUG=secret
  10. Run this command heroku config:set TELESCOPE_ENABLED=secret
  11. Run this command heroku config:set APP_URL=secret
  12. Run this command heroku config:set LOG_CHANNEL=errorlog
  13. Run this command heroku config:set DB_CONNECTION=pgsql
  14. Run this command heroku config:set DB_HOST=secret
  15. Run this command heroku config:set DB_PORT=secret
  16. Run this command heroku config:set DB_DATABASE=secret
  17. Run this command heroku config:set DB_USERNAME=secret
  18. Run this command heroku config:set DB_PASSWORD=secret
  19. Run this command heroku config:set BROADCAST_DRIVER=log
  20. Run this command heroku config:set CACHE_DRIVER=file
  21. Run this command heroku config:set SESSION_DRIVER=database
  22. Run this command heroku config:set SESSION_LIFETIME=120
  23. Run this command heroku config:set QUEUE_DRIVER=sync
  24. Run this command heroku config:set MAIL_DRIVER=secret
  25. Run this command heroku config:set MAIL_HOST=secret
  26. Run this command heroku config:set MAIL_USERNAME=secret
  27. Run this command heroku config:set MAIL_PASSWORD=secret
  28. Run this command heroku config:set MAIL_ENCRYPTION=secret
  29. Run this command heroku config:set MAIL_FROM_ADDRESS=secret
  30. Run this command heroku config:set MAIL_FROM_NAME=secret
  31. Run this command git push heroku master
  32. Run this command heroku open

or

Deploy to Heroku