From 523463f4259d5a2d09e303627d916628e81c1ba0 Mon Sep 17 00:00:00 2001 From: Dor Date: Mon, 22 Apr 2019 20:21:41 +0300 Subject: [PATCH] Added PHP documentation (#74) * Added newlines * Added newline * Improved docs * Added PHP docs * Updated versions * Added br * CR --- README.md | 1 + doc/runtimes/nodejs.md | 8 +-- doc/runtimes/php.md | 91 ++++++++++++++++++++++++++ doc/runtimes/python.md | 10 +-- images/runtime/php/Dockerfile.template | 2 +- 5 files changed, 102 insertions(+), 10 deletions(-) create mode 100644 doc/runtimes/php.md diff --git a/README.md b/README.md index 043611ab2..232a48546 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Runtime | Version Python | 2.7
3.6, 3.7 Node.js | 4.4, 4.5, 4.8
6.2, 6.6, 6.9, 6.10, 6.11
8.0, 8.1, 8.2, 8.8, 8.9, 8.11, 8.12
9.4
10.1, 10.10, 10.14, 10.15 .NET Core | 1.0, 1.1
2.0, 2.1, 2.2 +PHP | 5.6
7.0, 7.2, 7.3 Patches (0.0.**x**) are applied as soon as possible after they are released upstream. diff --git a/doc/runtimes/nodejs.md b/doc/runtimes/nodejs.md index 60bfafa30..619e51184 100644 --- a/doc/runtimes/nodejs.md +++ b/doc/runtimes/nodejs.md @@ -35,8 +35,8 @@ The following process is applied for each build. 1. Run custom script if specified by `PRE_BUILD_SCRIPT_PATH`. 1. Run `npm install` without any flags, which includes npm `preinstall` and `postinstall` scripts and also installs devDependencies. -1. Run `npm run build` if a `build` script is specified. -1. Run `npm run build:azure` if a `build:azure` script is specified. +1. Run `npm run build` if a `build` script is specified in your `package.json`. +1. Run `npm run build:azure` if a `build:azure` script is specified in your `package.json`. 1. Run custom script if specified by `POST_BUILD_SCRIPT_PATH`. > NOTE: As described in [npm docs][], scripts named `prebuild` and `postbuild` @@ -60,7 +60,7 @@ will be used instead of npm. The following process is applied to determine how to start an app. 1. Run `npm start` if a `start` script is specified. -1. If a script is specified in package.json's `main` field run that. +1. Else, if a script is specified in `package.json`'s `main` field, run that. 1. Run the first found of the following scripts in the root of the repo: * bin/www * server.js @@ -86,4 +86,4 @@ once every 3 months. Previous minor versions will remain available as long as the release is available. [release schedule]: https://github.com/nodejs/Release#release-schedule -[Azure Updates]: https://azure.microsoft.com/updates/ \ No newline at end of file +[Azure Updates]: https://azure.microsoft.com/updates/ diff --git a/doc/runtimes/php.md b/doc/runtimes/php.md new file mode 100644 index 000000000..5c1ea242c --- /dev/null +++ b/doc/runtimes/php.md @@ -0,0 +1,91 @@ +This document describes how **PHP** apps are detected and built. It includes +details on components and configuration of build and run images too. + +# Contents + +1. [Base Image](#base-image) + * [System packages](#system-packages) +1. [Detect](#detect) +1. [Build](#build) + * [Package manager](#package-manager) +1. [Run](#run) +1. [Version support](#version-support) + +# Base image + +PHP runtime images are layered on Docker's [official PHP +images](https://github.com/docker-library/php). + +## System packages + +The Apache HTTP Server is used as the application server. +The following PHP extensions are installed & enabled in the runtime images: + +* gd +* imagick +* mysqli +* opcache +* odbc +* sqlsrv +* pdo +* pdo_sqlsrv +* pdo_mysql +* pdo_pgsql +* pgsql +* ldap +* intl +* gmp +* zip +* bcmath +* mbstring +* pcntl +* calendar +* exif +* gettext +* imap +* tidy +* shmop +* soap +* sockets +* sysvmsg +* sysvsem +* sysvshm +* pdo_odbc +* wddx +* xmlrpc +* xsl + +# Detect + +The PHP toolset is run when a `composer.json` file exists in the root of the repository. + +# Build + +The following process is applied for each build: + +1. Run custom script if specified by `PRE_BUILD_SCRIPT_PATH`. +1. Run `php composer.phar install`. +1. Run custom script if specified by `POST_BUILD_SCRIPT_PATH`. + +## Package manager + +The latest version of *Composer* is used to install dependencies. + +# Run + +The following process is applied to determine how to start an app: + +1. If user has specified a start script, run it. +1. Else, run `apache2-foreground`. + +[Composer]: https://getcomposer.org/ + +# Version support + +The PHP project defines this [release schedule][]. Oryx supports all actively supported +releases (7.2, 7.3), in addition to 5.6 & 7.0. + +We will update the `patch` version of a release at least once every 3 months, +replacing the previous `patch` version for that release. + +[release schedule]: https://www.php.net/supported-versions.php diff --git a/doc/runtimes/python.md b/doc/runtimes/python.md index c97d6ec65..8029b3ae6 100644 --- a/doc/runtimes/python.md +++ b/doc/runtimes/python.md @@ -55,8 +55,8 @@ The latest version of `pip` is used to install dependencies. The following process is applied to determine how to start an app. -1. If user has specified a start script utilize that. -1. Find a WSGI module and run with [gunicorn][]. +1. If user has specified a start script, run it. +1. Else, find a WSGI module and run with [gunicorn][]. 1. Look for and run a directory containing a `wsgi.py` file (*for Django*). 1. Look for the following files in the root of the repo and an `app` class within them (*for Flask* and other WSGI frameworks). * `application.py` @@ -82,10 +82,10 @@ status, i.e. `3.7.x` and `2.7.x` in early 2019; and 3.6 and later releases in We will provide notification twelve months prior to removing a release line; subscribe to [Azure Updates][] to stay updated! -We will update the `micro` version of supported `major.minor` releases at -least once every 3 months, replacing the previous `micro` version for that +We will update the `patch` version of supported `major.minor` releases at +least once every 3 months, replacing the previous `patch` version for that release. [release schedule]: https://devguide.python.org/#status-of-python-branches ["Development Lifecycle"]: https://devguide.python.org/devcycle/#devcycle -[Azure Updates]: https://azure.microsoft.com/updates/ \ No newline at end of file +[Azure Updates]: https://azure.microsoft.com/updates/ diff --git a/images/runtime/php/Dockerfile.template b/images/runtime/php/Dockerfile.template index 0bd5467de..05b773f22 100644 --- a/images/runtime/php/Dockerfile.template +++ b/images/runtime/php/Dockerfile.template @@ -107,4 +107,4 @@ ARG AI_KEY ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY} COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen -RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx \ No newline at end of file +RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx