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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP apprunner #157

Closed
719media opened this issue Oct 31, 2022 · 5 comments
Closed

PHP apprunner #157

719media opened this issue Oct 31, 2022 · 5 comments
Projects

Comments

@719media
Copy link

719media commented Oct 31, 2022

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do * not help prioritize the request
    If you are interested in working on this issue or have submitted a pull request, please leave a comment

Tell us about your request
I can see that aws app runner now has support for php:
https://aws.amazon.com/about-aws/whats-new/2022/10/aws-app-runner-support-php-go-dot-net-ruby-managed-runtimes/
https://docs.aws.amazon.com/apprunner/latest/dg/service-source-code-php.html

However, the app runner run command is showing that the underlying service used is not the most popular method for running php (php-fpm + nginx), but rather php -S, which is php's webserver that they themselves note is only suitable for development (see https://www.php.net/manual/en/features.commandline.webserver.php)

I am wondering about the reasons behind running php this way for usage in app runner.

Thanks

@n1215
Copy link

n1215 commented Nov 13, 2022

I managed to find a way to run Apache HTTP Server and PHP-FPM on managed runtime.
https://github.com/n1215/app-runner-managed-php

I think using container-based service is much easier than customizing managed runtime.

To use in production, PHP managed runtime should support another execution method by default.

ex.

  • Apache + mod_php
  • Apache + PHP-FPM (multiple processes in a container)
  • nginx + PHP-FPM (multiple processes in a container)

@snnles snnles added this to We are working on it in Roadmap Jan 25, 2023
@lazarben
Copy link

lazarben commented Feb 1, 2023

Thank you reporting this issue and we are looking into this. We would like to get some feedback on how we are thinking about solving this issue. We will build apache and nginx default configs configured with PHP-FPM in the PHP language runtime. You can choose to start apache or nginx with php-fpm using the App Runner start command. This will allow you to run your PHP application in front of nginx/apache and PHP-FPM and not use the built in PHP development server

@719media
Copy link
Author

719media commented Feb 2, 2023

I'm not sure what feedback you are looking for, specifically.

The most common deployments are nginx + php-fpm, and apache + php-fpm.

Another contender that has gotten a lot of traction recently is nginx unit (https://unit.nginx.org/) + php. I would be very interested in something using nginx unit

@weproai
Copy link

weproai commented Feb 28, 2023

I want to run cronjobs in AppRunner. How i can setup.

@snnles
Copy link

snnles commented Mar 16, 2023

Hello everyone, App Runner now supports Apache and nginx webservers along with PHP-FPM. Refer to App Runner PHP documentation for more details. Thank you for your feedback.

Documentation: https://docs.aws.amazon.com/apprunner/latest/dg/service-source-code-php.html

@snnles snnles closed this as completed Mar 16, 2023
Roadmap automation moved this from We are working on it to Just Shipped Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Roadmap
Just Shipped
Development

No branches or pull requests

5 participants