The only difference is the env variables. I am considering defining this inside build_cloud.yaml file under "options" to make them global ones. However, I am not sure Laravel/PHP will pick up those env variables. I still need to try it out.
On Fri, Jan 8, 2021 at 9:24 PM Kaan <kaanso...@gmail.com> wrote: > My .02 but keep in mind that I don't use cloud build > > Build your apps to be identity aware, app.yaml doesn't even include the > app id anymore, the app can know whether it's in staging or production > > So basically, in theory, previously you only needed a build step that > renamed app.yaml's project ID, now you don't even need it, just deploy to > staging or production > > On Friday, January 8, 2021 at 1:07:43 PM UTC+3 Bill wrote: > >> Thanks a lot Elliot! That is really so much helpful! >> >> On Fri, Jan 8, 2021 at 12:01 AM 'Elliott (Cloud Platform Support)' via >> Google App Engine <google-a...@googlegroups.com> wrote: >> >>> Hello Bill, >>> >>> I was able to find the information you need at least to get started. The >>> following document >>> <https://cloud.google.com/docs/enterprise/best-practices-for-enterprise-organizations#project-structure> >>> describes what a project is and how you may use one or more than one >>> depending on your use case. Since you want two urls, each environment has >>> its own URL. >>> >>> “You control the scope of your projects. A single project might contain >>> multiple separate apps, or conversely a single app might include several >>> projects. Projects can contain resources spread across multiple regions and >>> geographies.” >>> >>> The article goes on and provides a recommendation… >>> >>> “to have one project per application per environment. For example, if >>> you have two applications, "app1" and "app2", each with a development and >>> production environment, you would have four projects: app1-dev, app1-prod, >>> app2-dev, app2-prod.” >>> >>> The reason is that the environments will be isolated from each other to >>> prevent changes from one application affecting the other. >>> >>> The article gives an example that you may “grant all developers access >>> to development projects but restrict production access to your CI/CD >>> pipeline.” >>> >>> The article goes on that your project structure depends on your business >>> case and requirements. >>> >>> There is an example structure here >>> <https://cloud.google.com/solutions/policies/designing-gcp-policies-enterprise> >>> . >>> >>> >>> You also asked about having separate app.yaml and cloud_build.yaml >>> files. From my understanding, it is possible to have separate configuration >>> files in each project. >>> >>> I hope I provided the information you need. >>> >>> >>> >>> >>> On Thursday, January 7, 2021 at 9:52:54 AM UTC-5 Bill wrote: >>> >>>> Hello, >>>> >>>> I have a Laravel app with app.yaml and cloud_build.yaml files. I need >>>> to deploy the master branch to production and dev branch to staging. Such >>>> that each environment has its own URL. >>>> >>>> Do I need a separate Cloud Project for each environment? Or I can use >>>> the same App Engine to host both the Production and Staging? >>>> >>>> If I need two separate projects, how can I have two app.yaml and two >>>> cloud_build.yaml files? >>>> >>>> >>>> Regards >>>> Bilal Haidar >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Google App Engine" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to google-appengi...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/google-appengine/c4760782-abf3-4722-8951-afab3c577fa5n%40googlegroups.com >>> <https://groups.google.com/d/msgid/google-appengine/c4760782-abf3-4722-8951-afab3c577fa5n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to google-appengine+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-appengine/c7dd2ad4-b4ef-494a-aeff-c382250cfa44n%40googlegroups.com > <https://groups.google.com/d/msgid/google-appengine/c7dd2ad4-b4ef-494a-aeff-c382250cfa44n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CAFDSF-28XTYPA%3DOe8ixUZ0p8Ng6BR0igWeNhJCnmYiY8htnBDQ%40mail.gmail.com.