aws / apprunner-roadmap

This is the public roadmap for AWS App Runner.
https://aws.amazon.com/apprunner/
Other
292 stars 13 forks source link

PHP apprunner #157

Closed 719media closed 1 year ago

719media commented 1 year ago

Community Note

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 commented 1 year ago

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.

lazarben commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

snnles commented 1 year ago

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