Skip to content
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

Default php config for nginx #722

Open
Schnitzel opened this issue Apr 5, 2023 · 1 comment
Open

Default php config for nginx #722

Schnitzel opened this issue Apr 5, 2023 · 1 comment

Comments

@Schnitzel
Copy link
Contributor

We're having a considerable amount of customers that are trying to run simple php scripts inside Lagoon and are struggling because there is no simple php config available in the nginx image.

Currently the support tells them to copy something like this https://gist.github.com/Schnitzel/6b19074386bc33d80b75f2f4824ecb03 which works for most simple php scripts.

I think though we can improve the Developer Experience even more, with one of these things:
A. create a new nginx-php image (like the nginx-drupal) image that has the nginx php config already in it and loaded
B. add a new php.conf nginx config to the nginx image and explain how to use it instead of the static-files.conf that is defaultly used.

Solution A would definitely be the one with the highest DX, but then we might up having a LOT of nginx-* images for all kind of languages, frameworks and applications.
So maybe Solution B would be a more scalable way for the future.

@bryangruneberg
Copy link
Contributor

bryangruneberg commented Apr 5, 2023

We just ran into this for a Craft CMS demo (https://github.com/amazeeio-demos/demo-craft-simple)

We approached it in the "A" version way - but after doing this I fully agree that A would result in a lot of nginx-*.
https://github.com/amazeeio-demos/demo-craft-simple/blob/main/lagoon/nginx-craft.conf

I vote for the B solution.

I would proposed rather than php.conf perhaps php-app.conf or php-server.conf. From a DX perspective php.conf and php.ini are super close - I get that these are unrelated - but from the perspective of a php developer setting this up, I think it could be clearer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants