A simple Laravel Application (Order Listing App.) showing how to develop and deploy Laravel application on Google Cloud Platforms (App. Engine).
This Presentation was used during a codelab session at Google I/O '17 Extended Ibadan organised by Google Developers Group, Ibadan.
Extensible Python: Robustness through Addition - PyCon 2024
Develop & Deploy your Laravel Application on Google Cloud Platforms
1. Build & Deploy your Laravel
Application on Google Cloud
Platforms
Olanrewaju Abidogun
Software Developer, Total Infotech &
Telecoms Limited
2. Who am I?
❖ Software Developer at Total
Infotech & Telecoms Limited
❖ Lead Developer at Outfit Nigeria
❖ Ex. Software Developer Cellcore
Limited
❖ Data Science Enthusiast
Twitter | Github [@codeInBit]
3. What We’ll Cover
● Basic Introduction to Laravel
● Setting up our Development
Environment
● Build a simple order listing app.
● Basic Introduction to Google Cloud
Platforms
● Deploy our app. on Google App
Engine
4. What You’ll Learn
● How laravel works
● How to bootstrap a simple Laravel
Application
● How to deploy your Laravel
Application on Google Cloud
Platform (App Engine)
6. ❖ Open Source PHP Framework
❖ Supports MVC architectural pattern
❖ Simple, Elegant and Readable code
❖ Tailored for both team and solo developer
❖ It has strong community support
7. Lets setup our development environment
★ Server Requirements
○ Install a local server (LAMP/WAMP/MAMP et’ll)
■ Ensure it has the following specification
● PHP >= 5.6.4
● OpenSSL PHP Extension
● PDO PHP Extension
● Mbstring PHP Extension
● Tokenizer PHP Extension
● XML PHP Extension
★ Laravel Homestead
★ Valet
8. Lets setup our development environment
★ Install Laravel & Create a New Project
○ Install Composer (https://getcomposer.org/)
○ Download the Laravel Installer using (composer global require "laravel/installer")
○ Create a new Laravel Project with (laravel new blog)
12. Google Cloud Platforms
It’s a suite of cloud computing services that runs on the same infrastructure that
Google uses internally for its end-user products, such as Google Search, Youtube
etc.
13. Why Google Cloud Platform
❖ Secure
❖ High Performance
❖ Cost Effective
❖ It has everything you need to build and scale. Compute, databases and
storage, networking, developer tools, etc...
The list is endless…..
14. Now we need to deploy your Laravel
Application on Cloud
15. Requirement
❖ Create a project in the Google Cloud Platform Console (Note you Project ID)
❖ Enable billing for your project.
❖ Install the Google Cloud SDK.
16. Deploy
❖ Create an app.yaml file with the following contents in your laravel project:
17. Deploy contd.
❖ Run the command “php artisan key:generate --show”, then update
YOUR_APP_KEY in app.yaml with the value
❖ Add the following under scripts in composer.json
"post-deploy-cmd": [
"chmod -R 755 bootstrap/cache"
]
❖ Run the command “gcloud app deploy”
❖ Visit http://YOUR_PROJECT_ID.appspot.com to see your application.