Deploy PHP App using GCP Cloud Build
Create a GCP Project
https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project
Setup Deploy
https://cloud.google.com/community/tutorials/run-laravel-on-appengine-flexible#deploy
Migrate Deployment To Container Registry
Preparation
Most likely we need to use custom runtime.
If you renamed your 'app.yaml', may be you need to duplicate it to 'app.yaml' because it require to have 'app.yaml' at this stage.
Then, run this command,
`gcloud beta app gen-config --custom`
This command will do work on the 'app.yaml'
This command will do work on the 'app.yaml'
It will generate Dockerfile and update app.yaml
Setup Build Trigger
- Cloud Build > Enable Service > add Trigger
- create cloudbuild.yaml
Enable App Engine Admin API
- go to Marketplace
- find 'Google App Engine Admin API', enable it
Upgrade Service Account Role
- find service account with role 'Cloud Build Service Account'
- add role 'App Engine Admin'
Deploy
Make a commit to the repo branch and push. That's all!
Comments
Post a Comment