Sign inSign up

nicolabello/apache-php-nodejs-for-cloud-run

By nicolabello

•Updated over 5 years ago

Apache, PHP and Node.js for Google Cloud Run

Image
1

2.9K

nicolabello/apache-php-nodejs-for-cloud-run repository overview

⁠Apache, PHP and Node.js for Google Cloud Run

This container has been created for Google Cloud Run⁠ fully managed:

  • It listen to port 8080
  • No SSL as provided out of the box from Google Cloud Run
  • All logs forwarded to the console

⁠What's included

Created from bitnami/minideb⁠ and overloaded with:

  • Apache 2.4 and ModSecurity (Including OWASP ModSecurity CRS)
  • PHP 7.3 and PHP-FPM
  • Node.js 12 and Yarn latest

⁠Extra startup commands

Create the file /entrypoint-extra.sh and add in it the extra startup commands to be executed. They will be executed before starting Apache.

⁠How to deploy

Refer to Cloud Run documentation⁠ for deploying to Google Cloud Run.

⁠Example Dockerfile
FROM nicolabello/apache-php-node-for-cloud-run

# Add vhost
COPY ./app-name-vhost.conf /vhosts/

# Copy app
COPY ./dist/ /apps/app-name/
⁠Example virtual host
<VirtualHost *:8080>

    DocumentRoot "/apps/app-name"

    # Enable PHP-FPM
    ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/apps/app-name/$1

    # Enable ModSecurity
    SecRuleEngine On

</VirtualHost>

⁠License

Licensed under the terms of GNU General Public License Version 2 or later⁠.

Tag summary

Content type

Image

Digest

Size

121.3 MB

Last updated

over 5 years ago

docker pull nicolabello/apache-php-nodejs-for-cloud-run