Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Laravel & google cloud platform do mix​!

Laravel & google cloud platform do mix​!

My presentation about running Laravel -the popular PHP framework- on Google App Engine. Session delivered at GDG Cairo through the GCP Next Extended season, on May 7th 2016. Original presentation on GDrive: https://goo.gl/vF5jaX

Abdelrahman Omran

May 25, 2016
Tweet

More Decks by Abdelrahman Omran

Other Decks in Programming

Transcript

  1. Session Outline This is just a proof of concept session,

    you get the concepts and dig deeper. Here’s what we’ll learn today? 1. What’s Google Cloud Platform? & Why? 2. What’s Google App Engine? 3. What’s Google Cloud Console? 4. What’s the other Google Cloud Services? 5. What’s Laravel? & Why? 6. Launch your Laravel Project on GCP in less than 10 minutes! Go ahead and register for a free trial with $300 free credit and make some awesome powerful apps! ;) https://cloud.google.com/free-trial/
  2. Technical Steps #1 1. Download Google App Engine SDK for

    PHP & follow installation steps on the same page according to your OS: https://cloud.google. com/appengine/downloads 2. Google Cloud Console > Create New Project “gcpcairo2” https://console. cloud.google.com 3. git clone https://github.com/laravel/laravel.git gcpcairo2
  3. Technical Steps #2 3. git checkout 5.1 4. Install `shpasser/GaeSupportL5`

    composer package: https://github. com/shpasser/GaeSupportL5 Add the following line to the `require` array in your project’s composer.json "shpasser/gae-support-l5": "~1.0" 5. Run `composer install` inside project’s directory to install all requirements.
  4. Technical Steps #3 6. Then include the service provider within

    `config/app.php` file: Shpasser\GaeSupportL5\GaeSupportServiceProvider::class, 7. Generate Laravel key: php -r "copy('.env.example', '.env');" php artisan key:generate
  5. Technical Steps #4 7. Now it’s time to prepare the

    project for Google App Engine: php artisan gae:setup --config gcpcairo2 8. Add the following lines to your `.env` for cache performance: CACHE_SERVICES_FILE=true CACHE_CONFIG_FILE=true CACHE_ROUTES_FILE=true CACHE_COMPILED_VIEWS=true
  6. Technical Steps #5 9. Temporary enable debug mode in `.env`

    file: APP_DEBUG=true 10. It’s time to deploy your application online: appcfg.py -A gcpcairo2 -V v1 update . --noauth_local_webserver 11. You’re done! Access: https://gcpcairo2.appspot.com
  7. Register Now & Get Started Go ahead and register for

    a free trial with $300 free credit and make some awesome powerful apps! ;) https://cloud.google.com/free-trial/