From 8157e8261635d8b3a144964295a8c489238dddac Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Wed, 16 Oct 2024 15:28:44 -0400 Subject: [PATCH] gen4-4everyone almost --- .github/workflows/build-php-images.yml | 6 + builders/php.js | 6 +- examples/5.3/.gitignore | 3 - examples/5.3/.lando.yml | 46 ------ examples/5.3/README.md | 127 ----------------- examples/5.3/config/apache.conf | 188 ------------------------- examples/5.3/config/nginx.conf | 30 ---- examples/5.3/config/php.ini | 4 - examples/5.3/index.php | 3 - examples/5.3/path_info.php | 1 - examples/5.3/web/index.php | 3 - examples/5.3/web/path_info.php | 1 - examples/5.4/.gitignore | 3 - examples/5.4/.lando.yml | 46 ------ examples/5.4/README.md | 123 ---------------- examples/5.4/config/apache.conf | 188 ------------------------- examples/5.4/config/nginx.conf | 30 ---- examples/5.4/config/php.ini | 4 - examples/5.4/index.php | 3 - examples/5.4/path_info.php | 1 - examples/5.4/web/index.php | 3 - examples/5.4/web/path_info.php | 1 - examples/5.5/.gitignore | 3 - examples/5.5/.lando.yml | 46 ------ examples/5.5/README.md | 123 ---------------- examples/5.5/config/apache.conf | 188 ------------------------- examples/5.5/config/nginx.conf | 30 ---- examples/5.5/config/php.ini | 4 - examples/5.5/index.php | 3 - examples/5.5/path_info.php | 1 - examples/5.5/web/index.php | 3 - examples/5.5/web/path_info.php | 1 - images/5.3-apache/Dockerfile | 83 ----------- images/5.3-apache/apache2.conf | 64 --------- images/5.3-fpm/Dockerfile | 80 ----------- images/5.3-fpm/docker-php-ext-enable | 83 ----------- images/5.3-fpm/php-fpm.conf | 65 --------- images/5.4-apache/Dockerfile | 79 ----------- images/5.4-apache/apache2-foreground | 17 --- images/5.4-fpm/Dockerfile | 75 ---------- images/5.5-apache/Dockerfile | 77 ---------- images/5.5-fpm/Dockerfile | 76 ---------- images/5.6-apache/Dockerfile | 7 +- images/5.6-fpm/Dockerfile | 9 +- images/7.0-apache/Dockerfile | 7 +- images/7.0-fpm/Dockerfile | 9 +- images/7.1-fpm/Dockerfile | 2 +- images/7.2-apache/Dockerfile | 2 +- images/7.2-fpm/Dockerfile | 4 +- images/7.3-apache/Dockerfile | 2 +- images/7.3-fpm/Dockerfile | 2 +- images/7.4-apache/Dockerfile | 2 +- images/7.4-fpm/Dockerfile | 2 +- 53 files changed, 45 insertions(+), 1924 deletions(-) delete mode 100644 examples/5.3/.gitignore delete mode 100644 examples/5.3/.lando.yml delete mode 100644 examples/5.3/README.md delete mode 100644 examples/5.3/config/apache.conf delete mode 100644 examples/5.3/config/nginx.conf delete mode 100644 examples/5.3/config/php.ini delete mode 100644 examples/5.3/index.php delete mode 100644 examples/5.3/path_info.php delete mode 100644 examples/5.3/web/index.php delete mode 100644 examples/5.3/web/path_info.php delete mode 100644 examples/5.4/.gitignore delete mode 100644 examples/5.4/.lando.yml delete mode 100644 examples/5.4/README.md delete mode 100644 examples/5.4/config/apache.conf delete mode 100644 examples/5.4/config/nginx.conf delete mode 100644 examples/5.4/config/php.ini delete mode 100644 examples/5.4/index.php delete mode 100644 examples/5.4/path_info.php delete mode 100644 examples/5.4/web/index.php delete mode 100644 examples/5.4/web/path_info.php delete mode 100644 examples/5.5/.gitignore delete mode 100644 examples/5.5/.lando.yml delete mode 100644 examples/5.5/README.md delete mode 100644 examples/5.5/config/apache.conf delete mode 100644 examples/5.5/config/nginx.conf delete mode 100644 examples/5.5/config/php.ini delete mode 100644 examples/5.5/index.php delete mode 100644 examples/5.5/path_info.php delete mode 100644 examples/5.5/web/index.php delete mode 100644 examples/5.5/web/path_info.php delete mode 100644 images/5.3-apache/Dockerfile delete mode 100644 images/5.3-apache/apache2.conf delete mode 100644 images/5.3-fpm/Dockerfile delete mode 100755 images/5.3-fpm/docker-php-ext-enable delete mode 100644 images/5.3-fpm/php-fpm.conf delete mode 100644 images/5.4-apache/Dockerfile delete mode 100755 images/5.4-apache/apache2-foreground delete mode 100644 images/5.4-fpm/Dockerfile delete mode 100644 images/5.5-apache/Dockerfile delete mode 100644 images/5.5-fpm/Dockerfile diff --git a/.github/workflows/build-php-images.yml b/.github/workflows/build-php-images.yml index fb07574..89a72c6 100644 --- a/.github/workflows/build-php-images.yml +++ b/.github/workflows/build-php-images.yml @@ -70,6 +70,12 @@ jobs: - image: php tag: 7.0-apache-4 context: images/7.0-apache + - image: php + tag: 5.6-fpm-4 + context: images/5.6-fpm + - image: php + tag: 5.6-apache-4 + context: images/5.6-apache steps: - name: Checkout code diff --git a/builders/php.js b/builders/php.js index 1b83978..a192004 100644 --- a/builders/php.js +++ b/builders/php.js @@ -93,6 +93,7 @@ module.exports = { version: '7.4', supported: ['8.3', '8.2', '8.1', '8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6', '5.5', '5.4', '5.3'], legacy: ['7.2', '7.1', '7.0', '5.6', '5.5', '5.4', '5.3'], + gen2: ['5.5', '5.4', '5.3'], path: [ '/app/vendor/bin', '/app/bin', @@ -148,9 +149,12 @@ module.exports = { // If xdebug is set to "true" then map it to "debug" if (options.xdebug === true) options.xdebug = 'debug'; + // for older generation models + if (_.includes(options.gen2, options.version)) options.suffix = '2'; + // Build the php const php = { - image: options.image ?? `devwithlando/php:${options.version}-${options.phpServer}-4`, + image: options.image ?? `devwithlando/php:${options.version}-${options.phpServer}-${options.suffix}`, environment: _.merge({}, options.environment, { PATH: options.path.join(':'), LANDO_WEBROOT: `/app/${options.webroot}`, diff --git a/examples/5.3/.gitignore b/examples/5.3/.gitignore deleted file mode 100644 index 4ef7878..0000000 --- a/examples/5.3/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor -composer.json -test diff --git a/examples/5.3/.lando.yml b/examples/5.3/.lando.yml deleted file mode 100644 index 0a8cb56..0000000 --- a/examples/5.3/.lando.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: lando-php53 -events: - post-start: - - defaults: php -i | grep memory_limit | grep -e "-1" -services: - defaults: - type: php:5.3 - composer_version: false - cli: - type: php:5.3 - composer_version: false - via: cli - cliworker: - type: php:5.3 - composer_version: false - via: cli - command: sleep infinity - custom: - type: php:5.3 - composer_version: false - via: nginx - ssl: true - webroot: web - xdebug: true - config: - php: config/php.ini - overrides: - image: devwithlando/php:5.3-fpm-2 - environment: - DUALBLADE: maxim - OTHER: thing - custom_nginx: - build_as_root: - - mkdir -p /app/test && touch /app/test/managed_build_step - overrides: - environment: - MORE: things - OTHER: stuff -tooling: - php: - service: defaults - -# This is important because it lets lando know to test against the plugin in this repo -# DO NOT REMOVE THIS! -plugins: - "@lando/php": ../.. diff --git a/examples/5.3/README.md b/examples/5.3/README.md deleted file mode 100644 index 55d73d1..0000000 --- a/examples/5.3/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# PHP 5.3 Example - -This example exists primarily to test the following documentation: - -* [PHP Service](https://docs.lando.dev/config/php.html) -* [Installing Node in a PHP Service](https://docs.lando.dev/guides/installing-node-in-your-lando-php-service.html) -* [Issue #1990](https://github.com/lando/lando/issues/1990) -* [Issue #2192](https://github.com/lando/lando/issues/2192) - -And probably other stuff - -## Start up tests - -Run the following commands to get up and running with this example. - -```bash -# Should start up successfully -lando poweroff -lando start -``` - -## Verification commands - -Run the following commands to validate things are rolling as they should. - -```bash -# Should use 5.3 as the default php version -lando exec defaults -- php -v | grep "PHP 5.3" - -# Should use 9.x as the default postgresql-client version -lando exec defaults -- psql -V | grep "9." - -# Should use apache 2.4 as the default webserver version -lando exec defaults -- apachectl -V | grep "2.4." - -# Should only serve over http by default -lando exec defaults -- curl https://localhost || echo $? | grep 7 - -# Should serve from the app root by default -lando exec defaults -- curl http://localhost | grep "ROOTDIR" - -# Should have a 1G php mem limit on appserver -lando exec defaults -- curl http://localhost | grep "memory_limit" | grep "1G" - -# Should have COMPOSER_MEMORY_LIMIT set to -1 -lando exec defaults -- env | grep "COMPOSER_MEMORY_LIMIT=-1" - -# Should install composer 1.x by default -lando exec defaults -- composer --version --no-ansi | grep "Composer version 1." - -# Should have unlimited memory for php for CLI opts -lando php -i | grep memory_limit | grep -e "-1" -lando exec defaults -- php -i | grep "memory_limit" | grep -e "-1" - -# Should not enable xdebug by default -lando exec defaults -- php -m | grep xdebug || echo $? | grep 1 - -# Should have a PATH_INFO and PATH_TRANSLATED SERVER vars -lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO -lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED - -# Should use specified php version if given -lando exec custom -- php -v | grep "PHP 5.3" - -# Should install composer 1.x if composer_version is set to true -lando exec custom -- composer --version --no-ansi | grep "Composer version 1." - -# Should serve via nginx if specified -lando exec custom_nginx -- curl http://localhost | grep "WEBDIR" - -# Should serve via https if specified -lando exec custom_nginx -- curl https://localhost | grep "WEBDIR" - -# Should enable xdebug if specified -lando exec custom -- php -m | grep "xdebug" - -# Should not serve port 80 for cli -lando exec cli -- curl http://localhost || echo $? | grep 7 - -# Should install the latest composer 1.x using the 1 flag -lando exec cli -- composer --version --no-ansi | grep "Composer version 1." - -# Should use custom php ini if specified -lando exec custom -- php -i | grep memory_limit | grep 514 -lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On - -# Should inherit overrides from its generator -lando exec custom -- env | grep DUALBLADE | grep maxim -lando exec custom_nginx -- env | grep DUALBLADE | grep maxim - -# Should be able to run build steps on lando managed nginx service -# https://github.com/lando/lando/issues/1990 -lando exec custom_nginx -- cat /app/test/managed_build_step - -# Should be able to override lando managed nginx service -# https://github.com/lando/lando/issues/1990 -lando exec custom_nginx -- env | grep OTHER | grep stuff -lando exec custom_nginx -- env | grep MORE | grep things - -# Should set PATH_INFO and PATH_TRANSLATED if appropriate -# https://github.com/lando/lando/issues/2192 -lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" -lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/web/a/b.php" -lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" -lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" -lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/a/b.php" -lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" - -# Should allow cli services to specify a boot up command -lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity - -# Should install the latest composer 1.x by default. -lando exec cliworker -- composer --version --no-ansi | grep "Composer version 1." - -# Should print out docker logs -docker logs landophp53_custom_nginx_1 -``` - -## Destroy tests - -Run the following commands to trash this app like nothing ever happened. - -```bash -# Should be destroyed with success -lando destroy -y -lando poweroff -``` diff --git a/examples/5.3/config/apache.conf b/examples/5.3/config/apache.conf deleted file mode 100644 index 3a82953..0000000 --- a/examples/5.3/config/apache.conf +++ /dev/null @@ -1,188 +0,0 @@ - - # WHAT IN THE WORLD HAPPENED TO YOU, SERIOUSLY - # The ServerName directive sets the request scheme, hostname and port that - # the server uses to identify itself. This is used when creating - # redirection URLs. In the context of virtual hosts, the ServerName - # specifies what hostname must appear in the request's Host: header to - # match this virtual host. For the default virtual host (this file) this - # value is not decisive as it is used as a last resort host regardless. - # However, you must set it for any further virtual host explicitly. - ServerName appserver - - ServerAdmin webmaster@localhost - DocumentRoot ${LANDO_WEBROOT} - - Options Indexes FollowSymLinks MultiViews - AllowOverride All - Order allow,deny - Allow from all - Require all granted - - - # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, - # error, crit, alert, emerg. - # It is also possible to configure the loglevel for particular - # modules, e.g. - #LogLevel info ssl:warn - - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined - - # For most configuration files from conf-available/, which are - # enabled or disabled at a global level, it is possible to - # include a line for only one particular virtual host. For example the - # following line enables the CGI configuration for this host only - # after it has been globally disabled with "a2disconf". - #Include conf-available/serve-cgi-bin.conf - - # Pass some common ENVs, its ok if this fails - SetEnv BACKDROP_SETTINGS ${BACKDROP_SETTINGS} - SetEnvIf x-forwarded-proto https HTTPS=on - - - - - - ServerAdmin webmaster@localhost - ServerName appserver - - DocumentRoot ${LANDO_WEBROOT} - - Options Indexes FollowSymLinks MultiViews - AllowOverride All - Order allow,deny - Allow from all - Require all granted - - # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, - # error, crit, alert, emerg. - # It is also possible to configure the loglevel for particular - # modules, e.g. - #LogLevel info ssl:warn - - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined - - # For most configuration files from conf-available/, which are - # enabled or disabled at a global level, it is possible to - # include a line for only one particular virtual host. For example the - # following line enables the CGI configuration for this host only - # after it has been globally disabled with "a2disconf". - #Include conf-available/serve-cgi-bin.conf - - # SSL Engine Switch: - # Enable/Disable SSL for this virtual host. - SSLEngine on - - # A self-signed (snakeoil) certificate can be created by installing - # the ssl-cert package. See - # /usr/share/doc/apache2/README.Debian.gz for more info. - # If both key and certificate are stored in the same file, only the - # SSLCertificateFile directive is needed. - SSLCertificateFile "/certs/cert.crt" - SSLCertificateKeyFile "/certs/cert.key" - - # Server Certificate Chain: - # Point SSLCertificateChainFile at a file containing the - # concatenation of PEM encoded CA certificates which form the - # certificate chain for the server certificate. Alternatively - # the referenced file can be the same as SSLCertificateFile - # when the CA certificates are directly appended to the server - # certificate for convenience. - #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt - - # Certificate Authority (CA): - # Set the CA certificate verification path where to find CA - # certificates for client authentication or alternatively one - # huge file containing all of them (file must be PEM encoded) - # Note: Inside SSLCACertificatePath you need hash symlinks - # to point to the certificate files. Use the provided - # Makefile to update the hash symlinks after changes. - #SSLCACertificatePath /etc/ssl/certs/ - #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt - - # Certificate Revocation Lists (CRL): - # Set the CA revocation path where to find CA CRLs for client - # authentication or alternatively one huge file containing all - # of them (file must be PEM encoded) - # Note: Inside SSLCARevocationPath you need hash symlinks - # to point to the certificate files. Use the provided - # Makefile to update the hash symlinks after changes. - #SSLCARevocationPath /etc/apache2/ssl.crl/ - #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl - - # Client Authentication (Type): - # Client certificate verification type and depth. Types are - # none, optional, require and optional_no_ca. Depth is a - # number which specifies how deeply to verify the certificate - # issuer chain before deciding the certificate is not valid. - #SSLVerifyClient require - #SSLVerifyDepth 10 - - # SSL Engine Options: - # Set various options for the SSL engine. - # o FakeBasicAuth: - # Translate the client X.509 into a Basic Authorisation. This means that - # the standard Auth/DBMAuth methods can be used for access control. The - # user name is the `one line' version of the client's X.509 certificate. - # Note that no password is obtained from the user. Every entry in the user - # file needs this password: `xxj31ZMTZzkVA'. - # o ExportCertData: - # This exports two additional environment variables: SSL_CLIENT_CERT and - # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the - # server (always existing) and the client (only existing when client - # authentication is used). This can be used to import the certificates - # into CGI scripts. - # o StdEnvVars: - # This exports the standard SSL/TLS related `SSL_*' environment variables. - # Per default this exportation is switched off for performance reasons, - # because the extraction step is an expensive operation and is usually - # useless for serving static content. So one usually enables the - # exportation for CGI and SSI requests only. - # o OptRenegotiate: - # This enables optimized SSL connection renegotiation handling when SSL - # directives are used in per-directory context. - #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire - - SSLOptions +StdEnvVars - - - SSLOptions +StdEnvVars - - - # SSL Protocol Adjustments: - # The safe and default but still SSL/TLS standard compliant shutdown - # approach is that mod_ssl sends the close notify alert but doesn't wait for - # the close notify alert from client. When you need a different shutdown - # approach you can use one of the following variables: - # o ssl-unclean-shutdown: - # This forces an unclean shutdown when the connection is closed, i.e. no - # SSL close notify alert is send or allowed to received. This violates - # the SSL/TLS standard but is needed for some brain-dead browsers. Use - # this when you receive I/O errors because of the standard approach where - # mod_ssl sends the close notify alert. - # o ssl-accurate-shutdown: - # This forces an accurate shutdown when the connection is closed, i.e. a - # SSL close notify alert is send and mod_ssl waits for the close notify - # alert of the client. This is 100% SSL/TLS standard compliant, but in - # practice often causes hanging connections with brain-dead browsers. Use - # this only for browsers where you know that their SSL implementation - # works correctly. - # Notice: Most problems of broken clients are also related to the HTTP - # keep-alive facility, so you usually additionally want to disable - # keep-alive for those clients, too. Use variable "nokeepalive" for this. - # Similarly, one has to force some clients to use HTTP/1.0 to workaround - # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and - # "force-response-1.0" for this. - BrowserMatch "MSIE [2-6]" \ - nokeepalive ssl-unclean-shutdown \ - downgrade-1.0 force-response-1.0 - # MSIE 7 and newer should be able to use keepalive - BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown - - # Pass some common ENVs, its ok if this fails - SetEnv BACKDROP_SETTINGS ${BACKDROP_SETTINGS} - SetEnvIf x-forwarded-proto https HTTPS=on - - - diff --git a/examples/5.3/config/nginx.conf b/examples/5.3/config/nginx.conf deleted file mode 100644 index f874450..0000000 --- a/examples/5.3/config/nginx.conf +++ /dev/null @@ -1,30 +0,0 @@ -server { - listen 443 ssl; - listen 80; - listen [::]:80 default ipv6only=on; - server_name localhost; - - ssl_certificate /certs/cert.crt; - ssl_certificate_key /certs/cert.key; - - ssl_session_cache shared:SSL:1m; - ssl_session_timeout 5m; - - ssl_ciphers HIGH:!aNULL:!MD5; - ssl_prefer_server_ciphers on; - - root "{{LANDO_WEBROOT}}"; - index index.php index.html index.htm; - - # hello - location ~ \.php$ { - fastcgi_pass fpm:9000; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_buffers 256 128k; - fastcgi_connect_timeout 300s; - fastcgi_send_timeout 300s; - fastcgi_read_timeout 300s; - include fastcgi_params; - } -} diff --git a/examples/5.3/config/php.ini b/examples/5.3/config/php.ini deleted file mode 100644 index 1076fd2..0000000 --- a/examples/5.3/config/php.ini +++ /dev/null @@ -1,4 +0,0 @@ -[PHP] - -memory_limit = 514M -html_errors = On diff --git a/examples/5.3/index.php b/examples/5.3/index.php deleted file mode 100644 index d64cf6b..0000000 --- a/examples/5.3/index.php +++ /dev/null @@ -1,3 +0,0 @@ -ROOTDIR - - diff --git a/examples/5.3/path_info.php b/examples/5.3/path_info.php deleted file mode 100644 index ccce0c3..0000000 --- a/examples/5.3/path_info.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/5.3/web/index.php b/examples/5.3/web/index.php deleted file mode 100644 index b9b85a7..0000000 --- a/examples/5.3/web/index.php +++ /dev/null @@ -1,3 +0,0 @@ -WEBDIR - - diff --git a/examples/5.3/web/path_info.php b/examples/5.3/web/path_info.php deleted file mode 100644 index ccce0c3..0000000 --- a/examples/5.3/web/path_info.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/5.4/.gitignore b/examples/5.4/.gitignore deleted file mode 100644 index 4ef7878..0000000 --- a/examples/5.4/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor -composer.json -test diff --git a/examples/5.4/.lando.yml b/examples/5.4/.lando.yml deleted file mode 100644 index 7279920..0000000 --- a/examples/5.4/.lando.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: lando-php54 -events: - post-start: - - defaults: php -i | grep memory_limit | grep -e "-1" -services: - defaults: - type: php:5.4 - composer_version: false - cli: - type: php:5.4 - composer_version: false - via: cli - cliworker: - type: php:5.4 - composer_version: false - via: cli - command: sleep infinity - custom: - type: php:5.4 - composer_version: false - via: nginx - ssl: true - webroot: web - xdebug: true - config: - php: config/php.ini - overrides: - image: devwithlando/php:5.4-fpm-2 - environment: - DUALBLADE: maxim - OTHER: thing - custom_nginx: - build_as_root: - - mkdir -p /app/test && touch /app/test/managed_build_step - overrides: - environment: - MORE: things - OTHER: stuff -tooling: - php: - service: defaults - -# This is important because it lets lando know to test against the plugin in this repo -# DO NOT REMOVE THIS! -plugins: - "@lando/php": ../.. diff --git a/examples/5.4/README.md b/examples/5.4/README.md deleted file mode 100644 index fa72ae0..0000000 --- a/examples/5.4/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# PHP 5.4 Example - -This example exists primarily to test the following documentation: - -* [PHP Service](https://docs.lando.dev/config/php.html) -* [Issue #1990](https://github.com/lando/lando/issues/1990) -* [Issue #2192](https://github.com/lando/lando/issues/2192) - -And probably other stuff - -## Start up tests - -Run the following commands to get up and running with this example. - -```bash -# Should start up successfully -lando poweroff -lando start -``` - -## Verification commands - -Run the following commands to validate things are rolling as they should. - -```bash -# Should use 5.4 as the default php version -lando exec defaults -- php -v | grep "PHP 5.4" - -# Should use 9.x as the default postgresql-client version -lando exec defaults -- psql -V | grep "9." - -# Should use apache 2.4 as the default webserver version -lando exec defaults -- apachectl -V | grep "2.4." - -# Should only serve over http by default -lando exec defaults -- curl https://localhost || echo $? | grep 7 - -# Should serve from the app root by default -lando exec defaults -- curl http://localhost | grep "ROOTDIR" - -# Should have a 1G php mem limit on appserver -lando exec defaults -- curl http://localhost | grep "memory_limit" | grep "1G" - -# Should have COMPOSER_MEMORY_LIMIT set to -1 -lando exec defaults -- env | grep "COMPOSER_MEMORY_LIMIT=-1" - -# Should install composer 1.x by default -lando exec defaults -- composer --version --no-ansi | grep "Composer version 1." - -# Should have unlimited memory for php for CLI opts -lando php -i | grep memory_limit | grep -e "-1" -lando exec defaults -- php -i | grep "memory_limit" | grep -e "-1" - -# Should not enable xdebug by default -lando exec defaults -- php -m | grep xdebug || echo $? | grep 1 - -# Should have a PATH_INFO and PATH_TRANSLATED SERVER vars -lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO -lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED - -# Should use specified php version if given -lando exec custom -- php -v | grep "PHP 5.4" - -# Should install composer 1.x if composer_version is set to true -lando exec custom -- composer --version --no-ansi | grep "Composer version 1." - -# Should serve via nginx if specified -lando exec custom_nginx -- curl http://localhost | grep "WEBDIR" - -# Should serve via https if specified -lando exec custom_nginx -- curl https://localhost | grep "WEBDIR" - -# Should enable xdebug if specified -lando exec custom -- php -m | grep "xdebug" - -# Should not serve port 80 for cli -lando exec cli -- curl http://localhost || echo $? | grep 7 - -# Should install the latest composer 1.x using the 1 flag -lando exec cli -- composer --version --no-ansi | grep "Composer version 1." - -# Should use custom php ini if specified -lando exec custom -- php -i | grep memory_limit | grep 514 -lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On - -# Should inherit overrides from its generator -lando exec custom -- env | grep DUALBLADE | grep maxim -lando exec custom_nginx -- env | grep DUALBLADE | grep maxim - -# Should be able to run build steps on lando managed nginx service -# https://github.com/lando/lando/issues/1990 -lando exec custom_nginx -- cat /app/test/managed_build_step - -# Should be able to override lando managed nginx service -# https://github.com/lando/lando/issues/1990 -lando exec custom_nginx -- env | grep OTHER | grep stuff -lando exec custom_nginx -- env | grep MORE | grep things - -# Should set PATH_INFO and PATH_TRANSLATED if appropriate -# https://github.com/lando/lando/issues/2192 -lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" -lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/web/a/b.php" -lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" -lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" -lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/a/b.php" -lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" - -# Should allow cli services to specify a boot up command -lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity - -# Should install the latest composer 1.x by default. -lando exec cliworker -- composer --version --no-ansi | grep "Composer version 1." -``` - -## Destroy tests - -Run the following commands to trash this app like nothing ever happened. - -```bash -# Should be destroyed with success -lando destroy -y -lando poweroff -``` diff --git a/examples/5.4/config/apache.conf b/examples/5.4/config/apache.conf deleted file mode 100644 index 3a82953..0000000 --- a/examples/5.4/config/apache.conf +++ /dev/null @@ -1,188 +0,0 @@ - - # WHAT IN THE WORLD HAPPENED TO YOU, SERIOUSLY - # The ServerName directive sets the request scheme, hostname and port that - # the server uses to identify itself. This is used when creating - # redirection URLs. In the context of virtual hosts, the ServerName - # specifies what hostname must appear in the request's Host: header to - # match this virtual host. For the default virtual host (this file) this - # value is not decisive as it is used as a last resort host regardless. - # However, you must set it for any further virtual host explicitly. - ServerName appserver - - ServerAdmin webmaster@localhost - DocumentRoot ${LANDO_WEBROOT} - - Options Indexes FollowSymLinks MultiViews - AllowOverride All - Order allow,deny - Allow from all - Require all granted - - - # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, - # error, crit, alert, emerg. - # It is also possible to configure the loglevel for particular - # modules, e.g. - #LogLevel info ssl:warn - - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined - - # For most configuration files from conf-available/, which are - # enabled or disabled at a global level, it is possible to - # include a line for only one particular virtual host. For example the - # following line enables the CGI configuration for this host only - # after it has been globally disabled with "a2disconf". - #Include conf-available/serve-cgi-bin.conf - - # Pass some common ENVs, its ok if this fails - SetEnv BACKDROP_SETTINGS ${BACKDROP_SETTINGS} - SetEnvIf x-forwarded-proto https HTTPS=on - - - - - - ServerAdmin webmaster@localhost - ServerName appserver - - DocumentRoot ${LANDO_WEBROOT} - - Options Indexes FollowSymLinks MultiViews - AllowOverride All - Order allow,deny - Allow from all - Require all granted - - # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, - # error, crit, alert, emerg. - # It is also possible to configure the loglevel for particular - # modules, e.g. - #LogLevel info ssl:warn - - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined - - # For most configuration files from conf-available/, which are - # enabled or disabled at a global level, it is possible to - # include a line for only one particular virtual host. For example the - # following line enables the CGI configuration for this host only - # after it has been globally disabled with "a2disconf". - #Include conf-available/serve-cgi-bin.conf - - # SSL Engine Switch: - # Enable/Disable SSL for this virtual host. - SSLEngine on - - # A self-signed (snakeoil) certificate can be created by installing - # the ssl-cert package. See - # /usr/share/doc/apache2/README.Debian.gz for more info. - # If both key and certificate are stored in the same file, only the - # SSLCertificateFile directive is needed. - SSLCertificateFile "/certs/cert.crt" - SSLCertificateKeyFile "/certs/cert.key" - - # Server Certificate Chain: - # Point SSLCertificateChainFile at a file containing the - # concatenation of PEM encoded CA certificates which form the - # certificate chain for the server certificate. Alternatively - # the referenced file can be the same as SSLCertificateFile - # when the CA certificates are directly appended to the server - # certificate for convenience. - #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt - - # Certificate Authority (CA): - # Set the CA certificate verification path where to find CA - # certificates for client authentication or alternatively one - # huge file containing all of them (file must be PEM encoded) - # Note: Inside SSLCACertificatePath you need hash symlinks - # to point to the certificate files. Use the provided - # Makefile to update the hash symlinks after changes. - #SSLCACertificatePath /etc/ssl/certs/ - #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt - - # Certificate Revocation Lists (CRL): - # Set the CA revocation path where to find CA CRLs for client - # authentication or alternatively one huge file containing all - # of them (file must be PEM encoded) - # Note: Inside SSLCARevocationPath you need hash symlinks - # to point to the certificate files. Use the provided - # Makefile to update the hash symlinks after changes. - #SSLCARevocationPath /etc/apache2/ssl.crl/ - #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl - - # Client Authentication (Type): - # Client certificate verification type and depth. Types are - # none, optional, require and optional_no_ca. Depth is a - # number which specifies how deeply to verify the certificate - # issuer chain before deciding the certificate is not valid. - #SSLVerifyClient require - #SSLVerifyDepth 10 - - # SSL Engine Options: - # Set various options for the SSL engine. - # o FakeBasicAuth: - # Translate the client X.509 into a Basic Authorisation. This means that - # the standard Auth/DBMAuth methods can be used for access control. The - # user name is the `one line' version of the client's X.509 certificate. - # Note that no password is obtained from the user. Every entry in the user - # file needs this password: `xxj31ZMTZzkVA'. - # o ExportCertData: - # This exports two additional environment variables: SSL_CLIENT_CERT and - # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the - # server (always existing) and the client (only existing when client - # authentication is used). This can be used to import the certificates - # into CGI scripts. - # o StdEnvVars: - # This exports the standard SSL/TLS related `SSL_*' environment variables. - # Per default this exportation is switched off for performance reasons, - # because the extraction step is an expensive operation and is usually - # useless for serving static content. So one usually enables the - # exportation for CGI and SSI requests only. - # o OptRenegotiate: - # This enables optimized SSL connection renegotiation handling when SSL - # directives are used in per-directory context. - #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire - - SSLOptions +StdEnvVars - - - SSLOptions +StdEnvVars - - - # SSL Protocol Adjustments: - # The safe and default but still SSL/TLS standard compliant shutdown - # approach is that mod_ssl sends the close notify alert but doesn't wait for - # the close notify alert from client. When you need a different shutdown - # approach you can use one of the following variables: - # o ssl-unclean-shutdown: - # This forces an unclean shutdown when the connection is closed, i.e. no - # SSL close notify alert is send or allowed to received. This violates - # the SSL/TLS standard but is needed for some brain-dead browsers. Use - # this when you receive I/O errors because of the standard approach where - # mod_ssl sends the close notify alert. - # o ssl-accurate-shutdown: - # This forces an accurate shutdown when the connection is closed, i.e. a - # SSL close notify alert is send and mod_ssl waits for the close notify - # alert of the client. This is 100% SSL/TLS standard compliant, but in - # practice often causes hanging connections with brain-dead browsers. Use - # this only for browsers where you know that their SSL implementation - # works correctly. - # Notice: Most problems of broken clients are also related to the HTTP - # keep-alive facility, so you usually additionally want to disable - # keep-alive for those clients, too. Use variable "nokeepalive" for this. - # Similarly, one has to force some clients to use HTTP/1.0 to workaround - # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and - # "force-response-1.0" for this. - BrowserMatch "MSIE [2-6]" \ - nokeepalive ssl-unclean-shutdown \ - downgrade-1.0 force-response-1.0 - # MSIE 7 and newer should be able to use keepalive - BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown - - # Pass some common ENVs, its ok if this fails - SetEnv BACKDROP_SETTINGS ${BACKDROP_SETTINGS} - SetEnvIf x-forwarded-proto https HTTPS=on - - - diff --git a/examples/5.4/config/nginx.conf b/examples/5.4/config/nginx.conf deleted file mode 100644 index f874450..0000000 --- a/examples/5.4/config/nginx.conf +++ /dev/null @@ -1,30 +0,0 @@ -server { - listen 443 ssl; - listen 80; - listen [::]:80 default ipv6only=on; - server_name localhost; - - ssl_certificate /certs/cert.crt; - ssl_certificate_key /certs/cert.key; - - ssl_session_cache shared:SSL:1m; - ssl_session_timeout 5m; - - ssl_ciphers HIGH:!aNULL:!MD5; - ssl_prefer_server_ciphers on; - - root "{{LANDO_WEBROOT}}"; - index index.php index.html index.htm; - - # hello - location ~ \.php$ { - fastcgi_pass fpm:9000; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_buffers 256 128k; - fastcgi_connect_timeout 300s; - fastcgi_send_timeout 300s; - fastcgi_read_timeout 300s; - include fastcgi_params; - } -} diff --git a/examples/5.4/config/php.ini b/examples/5.4/config/php.ini deleted file mode 100644 index 1076fd2..0000000 --- a/examples/5.4/config/php.ini +++ /dev/null @@ -1,4 +0,0 @@ -[PHP] - -memory_limit = 514M -html_errors = On diff --git a/examples/5.4/index.php b/examples/5.4/index.php deleted file mode 100644 index d64cf6b..0000000 --- a/examples/5.4/index.php +++ /dev/null @@ -1,3 +0,0 @@ -ROOTDIR - - diff --git a/examples/5.4/path_info.php b/examples/5.4/path_info.php deleted file mode 100644 index ccce0c3..0000000 --- a/examples/5.4/path_info.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/5.4/web/index.php b/examples/5.4/web/index.php deleted file mode 100644 index b9b85a7..0000000 --- a/examples/5.4/web/index.php +++ /dev/null @@ -1,3 +0,0 @@ -WEBDIR - - diff --git a/examples/5.4/web/path_info.php b/examples/5.4/web/path_info.php deleted file mode 100644 index ccce0c3..0000000 --- a/examples/5.4/web/path_info.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/5.5/.gitignore b/examples/5.5/.gitignore deleted file mode 100644 index 4ef7878..0000000 --- a/examples/5.5/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor -composer.json -test diff --git a/examples/5.5/.lando.yml b/examples/5.5/.lando.yml deleted file mode 100644 index 0829d45..0000000 --- a/examples/5.5/.lando.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: lando-php55 -events: - post-start: - - defaults: php -i | grep memory_limit | grep -e "-1" -services: - defaults: - type: php:5.5 - composer_version: false - cli: - type: php:5.5 - composer_version: false - via: cli - cliworker: - type: php:5.5 - composer_version: false - via: cli - command: sleep infinity - custom: - type: php:5.5 - composer_version: false - via: nginx - ssl: true - webroot: web - xdebug: true - config: - php: config/php.ini - overrides: - image: devwithlando/php:5.5-fpm-2 - environment: - DUALBLADE: maxim - OTHER: thing - custom_nginx: - build_as_root: - - mkdir -p /app/test && touch /app/test/managed_build_step - overrides: - environment: - MORE: things - OTHER: stuff -tooling: - php: - service: defaults - -# This is important because it lets lando know to test against the plugin in this repo -# DO NOT REMOVE THIS! -plugins: - "@lando/php": ../.. diff --git a/examples/5.5/README.md b/examples/5.5/README.md deleted file mode 100644 index 41fa7b0..0000000 --- a/examples/5.5/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# PHP 5.5 Example - -This example exists primarily to test the following documentation: - -* [PHP Service](https://docs.lando.dev/config/php.html) -* [Issue #1990](https://github.com/lando/lando/issues/1990) -* [Issue #2192](https://github.com/lando/lando/issues/2192) - -And probably other stuff - -## Start up tests - -Run the following commands to get up and running with this example. - -```bash -# Should start up successfully -lando poweroff -lando start -``` - -## Verification commands - -Run the following commands to validate things are rolling as they should. - -```bash -# Should use 5.5 as the default php version -lando exec defaults -- php -v | grep "PHP 5.5" - -# Should use 9.x as the default postgresql-client version -lando exec defaults -- psql -V | grep "9." - -# Should use apache 2.4 as the default webserver version -lando exec defaults -- apachectl -V | grep "2.4." - -# Should only serve over http by default -lando exec defaults -- curl https://localhost || echo $? | grep 7 - -# Should serve from the app root by default -lando exec defaults -- curl http://localhost | grep "ROOTDIR" - -# Should have a 1G php mem limit on appserver -lando exec defaults -- curl http://localhost | grep "memory_limit" | grep "1G" - -# Should have COMPOSER_MEMORY_LIMIT set to -1 -lando exec defaults -- env | grep "COMPOSER_MEMORY_LIMIT=-1" - -# Should install composer 1.x by default -lando exec defaults -- composer --version --no-ansi | grep "Composer version 1." - -# Should have unlimited memory for php for CLI opts -lando php -i | grep memory_limit | grep -e "-1" -lando exec defaults -- php -i | grep "memory_limit" | grep -e "-1" - -# Should not enable xdebug by default -lando exec defaults -- php -m | grep xdebug || echo $? | grep 1 - -# Should have a PATH_INFO and PATH_TRANSLATED SERVER vars -lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO -lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED - -# Should use specified php version if given -lando exec custom -- php -v | grep "PHP 5.5" - -# Should install composer 1.x if composer_version is set to true -lando exec custom -- composer --version --no-ansi | grep "Composer version 1." - -# Should serve via nginx if specified -lando exec custom_nginx -- curl http://localhost | grep "WEBDIR" - -# Should serve via https if specified -lando exec custom_nginx -- curl https://localhost | grep "WEBDIR" - -# Should enable xdebug if specified -lando exec custom -- php -m | grep "xdebug" - -# Should not serve port 80 for cli -lando exec cli -- curl http://localhost || echo $? | grep 7 - -# Should install the latest composer 1.x using the 1 flag -lando exec cli -- composer --version --no-ansi | grep "Composer version 1." - -# Should use custom php ini if specified -lando exec custom -- php -i | grep memory_limit | grep 514 -lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On - -# Should inherit overrides from its generator -lando exec custom -- env | grep DUALBLADE | grep maxim -lando exec custom_nginx -- env | grep DUALBLADE | grep maxim - -# Should be able to run build steps on lando managed nginx service -# https://github.com/lando/lando/issues/1990 -lando exec custom_nginx -- cat /app/test/managed_build_step - -# Should be able to override lando managed nginx service -# https://github.com/lando/lando/issues/1990 -lando exec custom_nginx -- env | grep OTHER | grep stuff -lando exec custom_nginx -- env | grep MORE | grep things - -# Should set PATH_INFO and PATH_TRANSLATED if appropriate -# https://github.com/lando/lando/issues/2192 -lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" -lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/web/a/b.php" -lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" -lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" -lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/a/b.php" -lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" - -# Should allow cli services to specify a boot up command -lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity - -# Should install the latest composer 1.x by default. -lando exec cliworker -- composer --version --no-ansi | grep "Composer version 1." -``` - -## Destroy tests - -Run the following commands to trash this app like nothing ever happened. - -```bash -# Should be destroyed with success -lando destroy -y -lando poweroff -``` diff --git a/examples/5.5/config/apache.conf b/examples/5.5/config/apache.conf deleted file mode 100644 index 3a82953..0000000 --- a/examples/5.5/config/apache.conf +++ /dev/null @@ -1,188 +0,0 @@ - - # WHAT IN THE WORLD HAPPENED TO YOU, SERIOUSLY - # The ServerName directive sets the request scheme, hostname and port that - # the server uses to identify itself. This is used when creating - # redirection URLs. In the context of virtual hosts, the ServerName - # specifies what hostname must appear in the request's Host: header to - # match this virtual host. For the default virtual host (this file) this - # value is not decisive as it is used as a last resort host regardless. - # However, you must set it for any further virtual host explicitly. - ServerName appserver - - ServerAdmin webmaster@localhost - DocumentRoot ${LANDO_WEBROOT} - - Options Indexes FollowSymLinks MultiViews - AllowOverride All - Order allow,deny - Allow from all - Require all granted - - - # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, - # error, crit, alert, emerg. - # It is also possible to configure the loglevel for particular - # modules, e.g. - #LogLevel info ssl:warn - - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined - - # For most configuration files from conf-available/, which are - # enabled or disabled at a global level, it is possible to - # include a line for only one particular virtual host. For example the - # following line enables the CGI configuration for this host only - # after it has been globally disabled with "a2disconf". - #Include conf-available/serve-cgi-bin.conf - - # Pass some common ENVs, its ok if this fails - SetEnv BACKDROP_SETTINGS ${BACKDROP_SETTINGS} - SetEnvIf x-forwarded-proto https HTTPS=on - - - - - - ServerAdmin webmaster@localhost - ServerName appserver - - DocumentRoot ${LANDO_WEBROOT} - - Options Indexes FollowSymLinks MultiViews - AllowOverride All - Order allow,deny - Allow from all - Require all granted - - # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, - # error, crit, alert, emerg. - # It is also possible to configure the loglevel for particular - # modules, e.g. - #LogLevel info ssl:warn - - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined - - # For most configuration files from conf-available/, which are - # enabled or disabled at a global level, it is possible to - # include a line for only one particular virtual host. For example the - # following line enables the CGI configuration for this host only - # after it has been globally disabled with "a2disconf". - #Include conf-available/serve-cgi-bin.conf - - # SSL Engine Switch: - # Enable/Disable SSL for this virtual host. - SSLEngine on - - # A self-signed (snakeoil) certificate can be created by installing - # the ssl-cert package. See - # /usr/share/doc/apache2/README.Debian.gz for more info. - # If both key and certificate are stored in the same file, only the - # SSLCertificateFile directive is needed. - SSLCertificateFile "/certs/cert.crt" - SSLCertificateKeyFile "/certs/cert.key" - - # Server Certificate Chain: - # Point SSLCertificateChainFile at a file containing the - # concatenation of PEM encoded CA certificates which form the - # certificate chain for the server certificate. Alternatively - # the referenced file can be the same as SSLCertificateFile - # when the CA certificates are directly appended to the server - # certificate for convenience. - #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt - - # Certificate Authority (CA): - # Set the CA certificate verification path where to find CA - # certificates for client authentication or alternatively one - # huge file containing all of them (file must be PEM encoded) - # Note: Inside SSLCACertificatePath you need hash symlinks - # to point to the certificate files. Use the provided - # Makefile to update the hash symlinks after changes. - #SSLCACertificatePath /etc/ssl/certs/ - #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt - - # Certificate Revocation Lists (CRL): - # Set the CA revocation path where to find CA CRLs for client - # authentication or alternatively one huge file containing all - # of them (file must be PEM encoded) - # Note: Inside SSLCARevocationPath you need hash symlinks - # to point to the certificate files. Use the provided - # Makefile to update the hash symlinks after changes. - #SSLCARevocationPath /etc/apache2/ssl.crl/ - #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl - - # Client Authentication (Type): - # Client certificate verification type and depth. Types are - # none, optional, require and optional_no_ca. Depth is a - # number which specifies how deeply to verify the certificate - # issuer chain before deciding the certificate is not valid. - #SSLVerifyClient require - #SSLVerifyDepth 10 - - # SSL Engine Options: - # Set various options for the SSL engine. - # o FakeBasicAuth: - # Translate the client X.509 into a Basic Authorisation. This means that - # the standard Auth/DBMAuth methods can be used for access control. The - # user name is the `one line' version of the client's X.509 certificate. - # Note that no password is obtained from the user. Every entry in the user - # file needs this password: `xxj31ZMTZzkVA'. - # o ExportCertData: - # This exports two additional environment variables: SSL_CLIENT_CERT and - # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the - # server (always existing) and the client (only existing when client - # authentication is used). This can be used to import the certificates - # into CGI scripts. - # o StdEnvVars: - # This exports the standard SSL/TLS related `SSL_*' environment variables. - # Per default this exportation is switched off for performance reasons, - # because the extraction step is an expensive operation and is usually - # useless for serving static content. So one usually enables the - # exportation for CGI and SSI requests only. - # o OptRenegotiate: - # This enables optimized SSL connection renegotiation handling when SSL - # directives are used in per-directory context. - #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire - - SSLOptions +StdEnvVars - - - SSLOptions +StdEnvVars - - - # SSL Protocol Adjustments: - # The safe and default but still SSL/TLS standard compliant shutdown - # approach is that mod_ssl sends the close notify alert but doesn't wait for - # the close notify alert from client. When you need a different shutdown - # approach you can use one of the following variables: - # o ssl-unclean-shutdown: - # This forces an unclean shutdown when the connection is closed, i.e. no - # SSL close notify alert is send or allowed to received. This violates - # the SSL/TLS standard but is needed for some brain-dead browsers. Use - # this when you receive I/O errors because of the standard approach where - # mod_ssl sends the close notify alert. - # o ssl-accurate-shutdown: - # This forces an accurate shutdown when the connection is closed, i.e. a - # SSL close notify alert is send and mod_ssl waits for the close notify - # alert of the client. This is 100% SSL/TLS standard compliant, but in - # practice often causes hanging connections with brain-dead browsers. Use - # this only for browsers where you know that their SSL implementation - # works correctly. - # Notice: Most problems of broken clients are also related to the HTTP - # keep-alive facility, so you usually additionally want to disable - # keep-alive for those clients, too. Use variable "nokeepalive" for this. - # Similarly, one has to force some clients to use HTTP/1.0 to workaround - # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and - # "force-response-1.0" for this. - BrowserMatch "MSIE [2-6]" \ - nokeepalive ssl-unclean-shutdown \ - downgrade-1.0 force-response-1.0 - # MSIE 7 and newer should be able to use keepalive - BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown - - # Pass some common ENVs, its ok if this fails - SetEnv BACKDROP_SETTINGS ${BACKDROP_SETTINGS} - SetEnvIf x-forwarded-proto https HTTPS=on - - - diff --git a/examples/5.5/config/nginx.conf b/examples/5.5/config/nginx.conf deleted file mode 100644 index f874450..0000000 --- a/examples/5.5/config/nginx.conf +++ /dev/null @@ -1,30 +0,0 @@ -server { - listen 443 ssl; - listen 80; - listen [::]:80 default ipv6only=on; - server_name localhost; - - ssl_certificate /certs/cert.crt; - ssl_certificate_key /certs/cert.key; - - ssl_session_cache shared:SSL:1m; - ssl_session_timeout 5m; - - ssl_ciphers HIGH:!aNULL:!MD5; - ssl_prefer_server_ciphers on; - - root "{{LANDO_WEBROOT}}"; - index index.php index.html index.htm; - - # hello - location ~ \.php$ { - fastcgi_pass fpm:9000; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_buffers 256 128k; - fastcgi_connect_timeout 300s; - fastcgi_send_timeout 300s; - fastcgi_read_timeout 300s; - include fastcgi_params; - } -} diff --git a/examples/5.5/config/php.ini b/examples/5.5/config/php.ini deleted file mode 100644 index 1076fd2..0000000 --- a/examples/5.5/config/php.ini +++ /dev/null @@ -1,4 +0,0 @@ -[PHP] - -memory_limit = 514M -html_errors = On diff --git a/examples/5.5/index.php b/examples/5.5/index.php deleted file mode 100644 index d64cf6b..0000000 --- a/examples/5.5/index.php +++ /dev/null @@ -1,3 +0,0 @@ -ROOTDIR - - diff --git a/examples/5.5/path_info.php b/examples/5.5/path_info.php deleted file mode 100644 index ccce0c3..0000000 --- a/examples/5.5/path_info.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/5.5/web/index.php b/examples/5.5/web/index.php deleted file mode 100644 index b9b85a7..0000000 --- a/examples/5.5/web/index.php +++ /dev/null @@ -1,3 +0,0 @@ -WEBDIR - - diff --git a/examples/5.5/web/path_info.php b/examples/5.5/web/path_info.php deleted file mode 100644 index ccce0c3..0000000 --- a/examples/5.5/web/path_info.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/images/5.3-apache/Dockerfile b/images/5.3-apache/Dockerfile deleted file mode 100644 index 499cccc..0000000 --- a/images/5.3-apache/Dockerfile +++ /dev/null @@ -1,83 +0,0 @@ -# docker build -t devwithlando/php:5.3-apache-4 . - -FROM eugeneware/php-5.3:master - -# Copy our helpers -COPY apache2.conf /etc/apache2/apache2.conf - -# Install dependencies we need -RUN sed -i '/jessie-updates/d' /etc/apt/sources.list \ - && apt-get update && apt-get install -y \ - bzip2 \ - curl \ - exiftool \ - git-core \ - imagemagick \ - libbz2-dev \ - libc-client2007e-dev \ - libjpeg-dev \ - libkrb5-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng12-dev \ - libpq-dev \ - libxml2-dev \ - libicu-dev \ - mysql-client \ - postgresql-client \ - pv \ - ssh \ - unzip \ - wget \ - xfonts-base \ - xfonts-75dpi \ - zlib1g-dev \ - && mkdir -p /usr/local/etc/php/conf.d \ - && pecl install apc \ - && pecl install imagick-3.3.0 \ - && pecl install memcached-2.2.0 \ - && pecl install oauth-1.2.3 \ - && pecl install redis-2.2.8 \ - && pecl install xdebug-2.2.7 \ - && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ - && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ - && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ - && docker-php-ext-enable apc \ - && docker-php-ext-enable imagick \ - && docker-php-ext-enable memcached \ - && docker-php-ext-enable oauth \ - && docker-php-ext-enable redis \ - && docker-php-ext-install \ - bcmath \ - bz2 \ - calendar \ - curl \ - exif \ - gd \ - imap \ - ldap \ - mcrypt \ - mbstring \ - mysql \ - mysqli \ - pdo \ - pdo_mysql \ - pdo_pgsql \ - soap \ - zip \ - intl \ - gettext \ - pcntl \ - && rm -rf /usr/local/lib/conf.d \ - && ln -s /usr/local/etc/php/conf.d /usr/local/lib/conf.d \ - && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ - && php composer-setup.php --install-dir=/usr/local/bin --filename=composer --version=1.10.1 \ - && php -r "unlink('composer-setup.php');" \ - && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ - && sh -c "composer global require -n hirak/prestissimo" -s /bin/sh www-data \ - && apt-get -y clean \ - && apt-get -y autoclean \ - && apt-get -y autoremove \ - && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* diff --git a/images/5.3-apache/apache2.conf b/images/5.3-apache/apache2.conf deleted file mode 100644 index ab5b264..0000000 --- a/images/5.3-apache/apache2.conf +++ /dev/null @@ -1,64 +0,0 @@ -# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf - -Mutex file:/var/lock/apache2 default -PidFile /var/run/apache2/apache2.pid -Timeout 300 -KeepAlive On -MaxKeepAliveRequests 100 -KeepAliveTimeout 5 -User www-data -Group www-data -HostnameLookups Off -ErrorLog /proc/self/fd/2 -LogLevel warn - -IncludeOptional mods-enabled/*.load -IncludeOptional mods-enabled/*.conf - -# ports.conf -Listen 80 - - Listen 443 - - - Listen 443 - - - - Options FollowSymLinks - AllowOverride None - Require all denied - - - - AllowOverride All - Require all granted - - -DocumentRoot /var/www/html - -AccessFileName .htaccess - - Require all denied - - -LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined -LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined -LogFormat "%h %l %u %t \"%r\" %>s %O" common -LogFormat "%{Referer}i -> %U" referer -LogFormat "%{User-agent}i" agent - -CustomLog /proc/self/fd/1 combined - - - SetHandler application/x-httpd-php - - -# Multiple DirectoryIndex directives within the same context will add -# to the list of resources to look for rather than replace -# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex -DirectoryIndex disabled -DirectoryIndex index.php index.html - -IncludeOptional conf-enabled/*.conf -IncludeOptional sites-enabled/*.conf diff --git a/images/5.3-fpm/Dockerfile b/images/5.3-fpm/Dockerfile deleted file mode 100644 index 8397877..0000000 --- a/images/5.3-fpm/Dockerfile +++ /dev/null @@ -1,80 +0,0 @@ -# docker build -t devwithlando/php:5.3-apache-4 . - -FROM helder/php-5.3 - -# Copy our helpers -COPY docker-php-ext-* /usr/local/bin/ -COPY php-fpm.conf /usr/local/etc/php-fpm.conf - -# Install dependencies we need -RUN sed -i '/jessie-updates/d' /etc/apt/sources.list \ - && apt-get update && apt-get install -y \ - bzip2 \ - exiftool \ - git-core \ - imagemagick \ - libbz2-dev \ - libc-client2007e-dev \ - libjpeg-dev \ - libfreetype6-dev \ - libkrb5-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng12-dev \ - libpq-dev \ - libxml2-dev \ - libicu-dev \ - mysql-client \ - postgresql-client \ - pv \ - ssh \ - unzip \ - wget \ - xfonts-base \ - xfonts-75dpi \ - zlib1g-dev \ - && mkdir /usr/include/freetype2/freetype \ - && ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \ - && pecl install apc \ - && pecl install imagick-3.3.0 \ - && pecl install memcached-2.2.0 \ - && pecl install oauth-1.2.3 \ - && pecl install redis-2.2.8 \ - && pecl install xdebug-2.2.7 \ - && docker-php-ext-configure gd --with-freetype-dir=/usr/include/freetype2 --with-png-dir=/usr --with-jpeg-dir=/usr \ - && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ - && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ - && docker-php-ext-enable apc \ - && docker-php-ext-enable imagick \ - && docker-php-ext-enable memcached \ - && docker-php-ext-enable oauth \ - && docker-php-ext-enable redis \ - && docker-php-ext-install \ - bcmath \ - bz2 \ - calendar \ - exif \ - gd \ - imap \ - ldap \ - mcrypt \ - mbstring \ - mysqli \ - pdo_mysql \ - pdo_pgsql \ - soap \ - zip \ - intl \ - gettext \ - pcntl \ - && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ - && php composer-setup.php --install-dir=/usr/local/bin --filename=composer --version=1.10.1 \ - && php -r "unlink('composer-setup.php');" \ - && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ - && su -c "composer global require -n hirak/prestissimo" -s /bin/sh www-data \ - && apt-get -y clean \ - && apt-get -y autoclean \ - && apt-get -y autoremove \ - && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* diff --git a/images/5.3-fpm/docker-php-ext-enable b/images/5.3-fpm/docker-php-ext-enable deleted file mode 100755 index 6bcea2b..0000000 --- a/images/5.3-fpm/docker-php-ext-enable +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/sh -set -e - -cd "$(php -r 'echo ini_get("extension_dir");')" - -usage() { - echo "usage: $0 [options] module-name [module-name ...]" - echo " ie: $0 gd mysqli" - echo " $0 pdo pdo_mysql" - echo " $0 --ini-name 0-apc.ini apcu apc" - echo - echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) -} - -opts="$(getopt -o 'h?' --long 'help,ini-name:' -- "$@" || { usage >&2 && false; })" -eval set -- "$opts" - -iniName= -while true; do - flag="$1" - shift - case "$flag" in - --help|-h|'-?') usage && exit 0 ;; - --ini-name) iniName="$1" && shift ;; - --) break ;; - *) - { - echo "error: unknown flag: $flag" - usage - } >&2 - exit 1 - ;; - esac -done - -modules= -for module; do - if [ -z "$module" ]; then - continue - fi - if [ -f "$module.so" ] && ! [ -f "$module" ]; then - # allow ".so" to be optional - module="$module.so" - fi - if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" - echo >&2 - usage >&2 - exit 1 - fi - modules="$modules $module" -done - -if [ -z "$modules" ]; then - usage >&2 - exit 1 -fi - -for module in $modules; do - if nm -g "$module" | grep -q ' zend_extension_entry$'; then - # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" - else - line="extension=$module" - fi - - ext="$(basename "$module")" - ext="${ext%.*}" - if php -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then - # this isn't perfect, but it's better than nothing - # (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache') - echo >&2 - echo >&2 "warning: $ext ($module) is already loaded!" - echo >&2 - continue - fi - - ini="/usr/local/etc/php/conf.d/${iniName:-"docker-php-ext-$ext.ini"}" - if ! grep -q "$line" "$ini" 2>/dev/null; then - echo "$line" >> "$ini" - fi -done diff --git a/images/5.3-fpm/php-fpm.conf b/images/5.3-fpm/php-fpm.conf deleted file mode 100644 index e32d057..0000000 --- a/images/5.3-fpm/php-fpm.conf +++ /dev/null @@ -1,65 +0,0 @@ -; This file was initially adapated from the output of: (on PHP 5.6) -; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default - -[global] - -error_log = /proc/self/fd/2 -daemonize = no - -[www] - -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - -user = www-data -group = www-data - -listen = 9000 - -pm = dynamic -pm.max_children = 5 -pm.start_servers = 2 -pm.min_spare_servers = 1 -pm.max_spare_servers = 3 - -; Ensure worker stdout and stderr are sent to the main error log. -catch_workers_output = yes - -; Set some pantheon things -; Handles the fact that clear_env = no is not possible in 5.3.x -env['DOCROOT'] = $DOCROOT -env['DRUPAL_HASH_SALT'] = $DRUPAL_HASH_SALT -env['FILEMOUNT'] = $FILEMOUNT -env['FRAMEWORK'] = $FRAMEWORK -env['HOME'] = $HOME - -env['DB_HOST'] = $DB_HOST -env['DB_PORT'] = $DB_PORT -env['DB_USER'] = $DB_USER -env['DB_PASSWORD'] = $DB_PASSWORD -env['DB_NAME'] = $DB_NAME - -env['PANTHEON_BINDING'] = $PANTHEON_BINDING -env['PANTHEON_SITE'] = $PANTHEON_SITE -env['PANTHEON_SITE_NAME'] = $PANTHEON_SITE_NAME -env['PANTHEON_ENVIRONMENT'] = $PANTHEON_ENVIRONMENT - -env['PRESSFLOW_SETTINGS'] = $PRESSFLOW_SETTINGS -env['BACKDROP_SETTINGS'] = $BACKDROP_SETTINGS - -; Additional pantheon things -env['CACHE_HOST'] = $CACHE_HOST -env['CACHE_PORT'] = $CACHE_PORT -env['CACHE_PASSWORD'] = $CACHE_PASSWORD - -env['PANTHEON_INDEX_HOST'] = $PANTHEON_INDEX_HOST -env['PANTHEON_INDEX_PORT'] = $PANTHEON_INDEX_PORT - -env['AUTH_KEY'] = $AUTH_KEY -env['SECURE_AUTH_KEY'] = $SECURE_AUTH_KEY -env['LOGGED_IN_KEY'] = $LOGGED_IN_KEY -env['AUTH_SALT'] = $AUTH_SALT -env['SECURE_AUTH_SALT'] = $SECURE_AUTH_SALT -env['LOGGED_IN_SALT'] = $LOGGED_IN_SALT -env['NONCE_SALT'] = $NONCE_SALT -env['NONCE_KEY'] = $NONCE_KEY diff --git a/images/5.4-apache/Dockerfile b/images/5.4-apache/Dockerfile deleted file mode 100644 index 3c253f4..0000000 --- a/images/5.4-apache/Dockerfile +++ /dev/null @@ -1,79 +0,0 @@ -# docker build -t devwithlando/php:5.4-apache-4 . - -FROM php:5.4-apache - -# Inject the updated apache2-foreground script -COPY apache2-foreground /usr/local/bin/ - -# Install dependencies we need -RUN sed -i '/jessie-updates/d' /etc/apt/sources.list \ - && apt-get update && apt-get install -y \ - bzip2 \ - exiftool \ - git-core \ - imagemagick \ - libbz2-dev \ - libc-client2007e-dev \ - libjpeg-dev \ - libkrb5-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng12-dev \ - libpq-dev \ - libxml2-dev \ - libicu-dev \ - mysql-client \ - postgresql-client \ - pv \ - ssh \ - unzip \ - wget \ - xfonts-base \ - xfonts-75dpi \ - zlib1g-dev \ - && mkdir -p /usr/local/etc/php/conf.d \ - && pecl install apc \ - && pecl install imagick-3.3.0 \ - && pecl install memcached-2.2.0 \ - && pecl install oauth-1.2.3 \ - && pecl install redis-2.2.8 \ - && pecl install xdebug-2.4.1 \ - && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr \ - && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ - && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ - && docker-php-ext-enable apc \ - && docker-php-ext-enable imagick \ - && docker-php-ext-enable memcached \ - && docker-php-ext-enable oauth \ - && docker-php-ext-enable redis \ - && docker-php-ext-install \ - bcmath \ - bz2 \ - calendar \ - exif \ - gd \ - imap \ - ldap \ - mcrypt \ - mbstring \ - mysql \ - mysqli \ - pdo \ - pdo_mysql \ - pdo_pgsql \ - soap \ - zip \ - intl \ - gettext \ - pcntl \ - && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ - && php composer-setup.php --install-dir=/usr/local/bin --filename=composer --version=1.10.1 \ - && php -r "unlink('composer-setup.php');" \ - && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ - && su -c "composer global require -n hirak/prestissimo" -s /bin/sh www-data \ - && apt-get -y clean \ - && apt-get -y autoclean \ - && apt-get -y autoremove \ - && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* diff --git a/images/5.4-apache/apache2-foreground b/images/5.4-apache/apache2-foreground deleted file mode 100755 index f731ba4..0000000 --- a/images/5.4-apache/apache2-foreground +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -set -e - -# Note: we don't just use "apache2ctl" here because it itself is just a shell-script wrapper around apache2 which provides extra functionality like "apache2ctl start" for launching apache2 in the background. -# (also, when run as "apache2ctl ", it does not use "exec", which leaves an undesirable resident shell process) - -: "${APACHE_CONFDIR:=/etc/apache2}" -: "${APACHE_ENVVARS:=$APACHE_CONFDIR/envvars}" -if test -f "$APACHE_ENVVARS"; then - . "$APACHE_ENVVARS" -fi - -# Apache gets grumpy about PID files pre-existing -: "${APACHE_PID_FILE:=${APACHE_RUN_DIR:=/var/run/apache2}/apache2.pid}" -rm -f "$APACHE_PID_FILE" - -exec apache2 -DFOREGROUND "$@" diff --git a/images/5.4-fpm/Dockerfile b/images/5.4-fpm/Dockerfile deleted file mode 100644 index 999a5f7..0000000 --- a/images/5.4-fpm/Dockerfile +++ /dev/null @@ -1,75 +0,0 @@ -# docker build -t devwithlando/php:5.4-apache-4 . - -FROM php:5.4.45-fpm - -# Install dependencies we need -RUN sed -i '/jessie-updates/d' /etc/apt/sources.list \ - && apt-get update && apt-get install -y \ - bzip2 \ - exiftool \ - git-core \ - imagemagick \ - libbz2-dev \ - libc-client2007e-dev \ - libjpeg-dev \ - libkrb5-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng12-dev \ - libpq-dev \ - libxml2-dev \ - mysql-client \ - postgresql-client \ - libicu-dev \ - pv \ - ssh \ - unzip \ - wget \ - xfonts-base \ - xfonts-75dpi \ - zlib1g-dev \ - && pecl install apc \ - && pecl install imagick-3.3.0 \ - && pecl install memcached-2.2.0 \ - && pecl install oauth-1.2.3 \ - && pecl install redis-2.2.8 \ - && pecl install xdebug-2.4.1 \ - && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr \ - && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ - && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ - && docker-php-ext-enable apc \ - && docker-php-ext-enable imagick \ - && docker-php-ext-enable memcached \ - && docker-php-ext-enable oauth \ - && docker-php-ext-enable redis \ - && docker-php-ext-install \ - bcmath \ - bz2 \ - calendar \ - exif \ - gd \ - imap \ - ldap \ - mcrypt \ - mbstring \ - mysql \ - mysqli \ - pdo \ - pdo_mysql \ - pdo_pgsql \ - soap \ - zip \ - intl \ - gettext \ - pcntl \ - && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ - && php composer-setup.php --install-dir=/usr/local/bin --filename=composer --version=1.10.1 \ - && php -r "unlink('composer-setup.php');" \ - && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ - && su -c "composer global require -n hirak/prestissimo" -s /bin/sh www-data \ - && apt-get -y clean \ - && apt-get -y autoclean \ - && apt-get -y autoremove \ - && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* diff --git a/images/5.5-apache/Dockerfile b/images/5.5-apache/Dockerfile deleted file mode 100644 index 0e66023..0000000 --- a/images/5.5-apache/Dockerfile +++ /dev/null @@ -1,77 +0,0 @@ -# Basic apache php 5.5 appserver for Lando -# docker build -t devwithlando/php:5.5-apache-4 . - -FROM php:5.5-apache - -# Install dependencies we need -RUN sed -i '/jessie-updates/d' /etc/apt/sources.list \ - && apt-get update && apt-get install -y \ - bzip2 \ - exiftool \ - git-core \ - imagemagick \ - libbz2-dev \ - libc-client2007e-dev \ - libjpeg-dev \ - libkrb5-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng12-dev \ - libpq-dev \ - libxml2-dev \ - libicu-dev \ - mysql-client \ - postgresql-client \ - pv \ - ssh \ - unzip \ - wget \ - xfonts-base \ - xfonts-75dpi \ - zlib1g-dev \ - && pecl install apcu-4.0.11 \ - && pecl install imagick \ - && pecl install memcached-2.2.0 \ - && pecl install oauth-1.2.3 \ - && pecl install redis-2.2.8 \ - && pecl install xdebug-2.5.5 \ - && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr \ - && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ - && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ - && docker-php-ext-enable apcu \ - && docker-php-ext-enable imagick \ - && docker-php-ext-enable memcached \ - && docker-php-ext-enable oauth \ - && docker-php-ext-enable redis \ - && docker-php-ext-install \ - bcmath \ - bz2 \ - calendar \ - exif \ - gd \ - imap \ - ldap \ - mcrypt \ - mbstring \ - mysql \ - mysqli \ - opcache \ - pdo \ - pdo_mysql \ - pdo_pgsql \ - soap \ - zip \ - intl \ - gettext \ - pcntl \ - && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ - && php composer-setup.php --install-dir=/usr/local/bin --filename=composer --version=1.10.1 \ - && php -r "unlink('composer-setup.php');" \ - && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ - && su -c "composer global require -n hirak/prestissimo" -s /bin/sh www-data \ - && apt-get -y clean \ - && apt-get -y autoclean \ - && apt-get -y autoremove \ - && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* diff --git a/images/5.5-fpm/Dockerfile b/images/5.5-fpm/Dockerfile deleted file mode 100644 index 9461711..0000000 --- a/images/5.5-fpm/Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# docker build -t devwithlando/php:5.5-apache-4 . - -FROM php:5.5-fpm - -# Install dependencies we need -RUN sed -i '/jessie-updates/d' /etc/apt/sources.list \ - && apt-get update && apt-get install -y \ - bzip2 \ - exiftool \ - git-core \ - imagemagick \ - libbz2-dev \ - libc-client2007e-dev \ - libjpeg-dev \ - libkrb5-dev \ - libldap2-dev \ - libmagickwand-dev \ - libmcrypt-dev \ - libmemcached-dev \ - libpng12-dev \ - libpq-dev \ - libxml2-dev \ - libicu-dev \ - mysql-client \ - postgresql-client \ - pv \ - ssh \ - unzip \ - wget \ - xfonts-base \ - xfonts-75dpi \ - zlib1g-dev \ - && pecl install apcu-4.0.11 \ - && pecl install imagick \ - && pecl install memcached-2.2.0 \ - && pecl install oauth-1.2.3 \ - && pecl install redis-2.2.8 \ - && pecl install xdebug-2.5.5 \ - && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr \ - && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ - && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ - && docker-php-ext-enable apcu \ - && docker-php-ext-enable imagick \ - && docker-php-ext-enable memcached \ - && docker-php-ext-enable oauth \ - && docker-php-ext-enable redis \ - && docker-php-ext-install \ - bcmath \ - bz2 \ - calendar \ - exif \ - gd \ - imap \ - ldap \ - mcrypt \ - mbstring \ - mysql \ - mysqli \ - opcache \ - pdo \ - pdo_mysql \ - pdo_pgsql \ - soap \ - zip \ - intl \ - gettext \ - pcntl \ - && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ - && php composer-setup.php --install-dir=/usr/local/bin --filename=composer --version=1.10.1 \ - && php -r "unlink('composer-setup.php');" \ - && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ - && su -c "composer global require -n hirak/prestissimo" -s /bin/sh www-data \ - && apt-get -y clean \ - && apt-get -y autoclean \ - && apt-get -y autoremove \ - && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* diff --git a/images/5.6-apache/Dockerfile b/images/5.6-apache/Dockerfile index d2380e3..4ec148a 100644 --- a/images/5.6-apache/Dockerfile +++ b/images/5.6-apache/Dockerfile @@ -3,7 +3,12 @@ FROM php:5.6-apache-stretch # Install dependencies we need -RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ +RUN \ + sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \ + && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list \ + && sed -i '/stretch-updates/d' /etc/apt/sources.list \ + && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \ + && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ && apt -y update && apt-get install -y \ gnupg2 \ wget \ diff --git a/images/5.6-fpm/Dockerfile b/images/5.6-fpm/Dockerfile index 2c05e77..e23e1cd 100644 --- a/images/5.6-fpm/Dockerfile +++ b/images/5.6-fpm/Dockerfile @@ -1,9 +1,14 @@ -# docker build -t devwithlando/php:5.6-apache-4 . +# docker build -t devwithlando/php:5.6-fpm-4 . FROM php:5.6-fpm-stretch # Install dependencies we need -RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ +RUN \ + sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \ + && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list \ + && sed -i '/stretch-updates/d' /etc/apt/sources.list \ + && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \ + && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ && apt -y update && apt-get install -y \ gnupg2 \ wget \ diff --git a/images/7.0-apache/Dockerfile b/images/7.0-apache/Dockerfile index a9ccb24..7c7b301 100644 --- a/images/7.0-apache/Dockerfile +++ b/images/7.0-apache/Dockerfile @@ -3,7 +3,12 @@ FROM php:7.0-apache-stretch # Install dependencies we need -RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ +RUN \ + sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \ + && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list \ + && sed -i '/stretch-updates/d' /etc/apt/sources.list \ + && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \ + && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ && apt -y update && apt-get install -y \ gnupg2 \ wget \ diff --git a/images/7.0-fpm/Dockerfile b/images/7.0-fpm/Dockerfile index 8085f8f..9fa851c 100644 --- a/images/7.0-fpm/Dockerfile +++ b/images/7.0-fpm/Dockerfile @@ -1,9 +1,14 @@ -# docker build -t devwithlando/php:7.0-apache-4 . +# docker build -t devwithlando/php:7.0-fpm-4 . FROM php:7.0-fpm-stretch # Install dependencies we need -RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ +RUN \ + sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \ + && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list \ + && sed -i '/stretch-updates/d' /etc/apt/sources.list \ + && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \ + && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ && apt -y update && apt-get install -y \ gnupg2 \ wget \ diff --git a/images/7.1-fpm/Dockerfile b/images/7.1-fpm/Dockerfile index 4ea9d50..8f3b39e 100644 --- a/images/7.1-fpm/Dockerfile +++ b/images/7.1-fpm/Dockerfile @@ -1,4 +1,4 @@ -# docker build -t devwithlando/php:7.1-apache-4 . +# docker build -t devwithlando/php:7.1-fpm-4 . FROM php:7.1-fpm-buster diff --git a/images/7.2-apache/Dockerfile b/images/7.2-apache/Dockerfile index 74f3c2f..2b63ee3 100644 --- a/images/7.2-apache/Dockerfile +++ b/images/7.2-apache/Dockerfile @@ -45,7 +45,7 @@ RUN \ && pecl install memcached \ && pecl install oauth-2.0.2 \ && pecl install redis-3.1.2 \ - && pecl install xdebug \ + && pecl install xdebug-2.9.8 \ && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr \ && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ diff --git a/images/7.2-fpm/Dockerfile b/images/7.2-fpm/Dockerfile index f8f2503..cc1ce8e 100644 --- a/images/7.2-fpm/Dockerfile +++ b/images/7.2-fpm/Dockerfile @@ -1,4 +1,4 @@ -# docker build -t devwithlando/php:7.2-apache-4 . +# docker build -t devwithlando/php:7.2-fpm-4 . FROM php:7.2-fpm-buster @@ -45,7 +45,7 @@ RUN \ && pecl install memcached \ && pecl install oauth-2.0.2 \ && pecl install redis-3.1.2 \ - && pecl install xdebug-3.1.6 \ + && pecl install xdebug-2.9.8 \ && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr \ && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ diff --git a/images/7.3-apache/Dockerfile b/images/7.3-apache/Dockerfile index 6379817..be5c5b4 100644 --- a/images/7.3-apache/Dockerfile +++ b/images/7.3-apache/Dockerfile @@ -41,7 +41,7 @@ RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ && pecl install memcached \ && pecl install oauth-2.0.3 \ && pecl install redis-4.2.0 \ - && pecl install xdebug-3.1.6 \ + && pecl install xdebug-3.2.2 \ && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr \ && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ diff --git a/images/7.3-fpm/Dockerfile b/images/7.3-fpm/Dockerfile index f71606e..b70cf6e 100644 --- a/images/7.3-fpm/Dockerfile +++ b/images/7.3-fpm/Dockerfile @@ -41,7 +41,7 @@ RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ && pecl install memcached \ && pecl install oauth-2.0.3 \ && pecl install redis-4.2.0 \ - && pecl install xdebug-3.1.6 \ + && pecl install xdebug-3.2.2 \ && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr \ && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ diff --git a/images/7.4-apache/Dockerfile b/images/7.4-apache/Dockerfile index fb4db3d..c2318af 100644 --- a/images/7.4-apache/Dockerfile +++ b/images/7.4-apache/Dockerfile @@ -41,7 +41,7 @@ RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ && pecl install memcached \ && pecl install oauth-2.0.4 \ && pecl install redis-5.1.1 \ - && pecl install xdebug-3.1.6 \ + && pecl install xdebug-3.2.2 \ && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ && docker-php-ext-enable apcu \ && docker-php-ext-enable imagick \ diff --git a/images/7.4-fpm/Dockerfile b/images/7.4-fpm/Dockerfile index 8bc1448..77f2c3b 100644 --- a/images/7.4-fpm/Dockerfile +++ b/images/7.4-fpm/Dockerfile @@ -41,7 +41,7 @@ RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ && pecl install memcached \ && pecl install oauth-2.0.4 \ && pecl install redis-5.1.1 \ - && pecl install xdebug-3.1.6 \ + && pecl install xdebug-3.2.2 \ && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ && docker-php-ext-enable apcu \ && docker-php-ext-enable imagick \