-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PHP runtime configuration from composer.json #392
Add PHP runtime configuration from composer.json #392
Conversation
75abde3
to
8ae0f93
Compare
8ae0f93
to
f4a6b71
Compare
I like it in general. It feels like some of those things should be set in |
Good point @sl0wik , like if you're wanting to deploy the same repository on test/staging with a smaller instance and less concurrency, vs perhaps a larger instance and more concurrency in production? If we're talking using build packs to builder a docker container image for Cloud Run, there isn't really anything like an app.yaml file - so perhaps the environment variable options on the If we want it to be a file in the repository, I suppose those settings could be included in a And do we think In terms of the The configuration files are generated during the build and static inside the container for the Cloud Run style builds, however, on App Engine Standard, I say this as imagine you are using Cloud Deploy for a deployment pipeline into Cloud Run, you build a single docker image from source, then pass it to Cloud Deploy to roll out onto test/staging, then onto production - your instance size / concurrency could be different between the two environments, but you've got to use the same docker image. |
It's nice that common features can be tweaked without replacing the whole file. I support making these configs easy! Not sure about composer.json though, maybe environment variables will be more generic? |
Ok, thanks @sonnysasaka , I think it’s looking like the consensus is becoming environment variables rather than composer.json, which is fair. What are your thoughts on the php-fpm settings being runtime environment variables rather than build time variable, when on Cloud Run? |
@iamacarpet I agree with @sonnysasaka that env sounds like a better solution. You can pass env variables to both, App Engine and Cloud Run. I'm already using it to set composer version. |
Hi @iamacarpet,
I am a bit wary about php-fpm settings being runtime config, since it might make troubleshooting harder. I think build time is already convenient enough. |
To aid it a more idiomatic and friendly developer experience, when building for a PHP application, allow the runtime to be configured from
composer.json
, e.g.:You can omit this entirely, or omit individual fields, so just specify the bits you want to customise.
This should work for both App Engine Flex, plus Cloud Run.
RFC @sonnysasaka @sl0wik @jama22 @kennethye1
I don't necessarily intend to have this merged as is, but use it as a starting point for a further discussion, unless you are all happy - what do we think?