From 705d90d716e89297439db4ee879ca9bc8fdb0a06 Mon Sep 17 00:00:00 2001 From: Harvey Date: Sat, 2 Dec 2017 11:03:16 -0800 Subject: [PATCH 01/90] pre-release of 7.2 container --- Dockerfile | 12 ++++++------ README.md | 1 + docs/versioning.md | 8 ++++++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index dbc18db8..c13da24d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.1.12-fpm-alpine +FROM php:7.2.0-fpm-alpine LABEL maintainer="Ric Harvey " @@ -10,7 +10,7 @@ ENV NGINX_VERSION 1.13.7 ENV LUA_MODULE_VERSION 0.10.11 ENV DEVEL_KIT_MODULE_VERSION 0.3.0 ENV LUAJIT_LIB=/usr/lib -ENV LUAJIT_INC=/usr/include/luajit-2.0 +ENV LUAJIT_INC=/usr/include/luajit-2.1 # resolves #166 ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php @@ -100,7 +100,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ done; \ test -z "$found" && echo >&2 "error: failed to fetch GPG key $GPG_KEYS" && exit 1; \ gpg --batch --verify nginx.tar.gz.asc nginx.tar.gz \ - && rm -r "$GNUPGHOME" nginx.tar.gz.asc \ + #&& rm -r "$GNUPGHOME" nginx.tar.gz.asc \ && mkdir -p /usr/src \ && tar -zxC /usr/src -f nginx.tar.gz \ && tar -zxC /usr/src -f ndk.tar.gz \ @@ -158,7 +158,6 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ && ln -sf /dev/stderr /var/log/nginx/error.log RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \ -# sed -i -e "s/v3.4/edge/" /etc/apk/repositories && \ echo /etc/apk/respositories && \ apk update && \ apk add --no-cache bash \ @@ -195,8 +194,9 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo --with-png-dir=/usr/include/ \ --with-jpeg-dir=/usr/include/ && \ #curl iconv session - docker-php-ext-install pdo_mysql pdo_sqlite mysqli mcrypt gd exif intl xsl json soap dom zip opcache && \ - pecl install xdebug && \ + #docker-php-ext-install pdo_mysql pdo_sqlite mysqli mcrypt gd exif intl xsl json soap dom zip opcache && \ + docker-php-ext-install iconv pdo_mysql pdo_sqlite mysqli gd exif intl xsl json soap dom zip opcache && \ + #pecl install xdebug && \ docker-php-source delete && \ mkdir -p /etc/nginx && \ mkdir -p /var/www/app && \ diff --git a/README.md b/README.md index 9659cad6..8571731e 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on | Docker Tag | GitHub Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| | latest | Master Branch |1.13.7 | 7.1.12 | 3.4 | +| 1.4.0 | 7.2 Branch |1.13.7 | 7.2.0 | 3.6 | For other tags please see: [versioning](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 18e5ae02..831d570b 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -13,6 +13,8 @@ We will use the [semver](http://ricostacruz.com/cheatsheets/semver.html) style n The latest tag will always follow the master branch in git. the other versions will have releases attached. +#### PHP 7.1 + | Docker Tag | GitHub Release | Nginx Version | PHP Version | Alpine Version | Container Scripts | |-----|-------|-----|--------|--------|--------| | latest | Master Branch |1.13.2 | 7.1.7 | 3.4 | 0.2.9 | @@ -41,6 +43,12 @@ The latest tag will always follow the master branch in git. the other versions w | 1.3.9 | 1.3.9 |1.13.7 | 7.1.11 | 3.4 | 0.3.3 | | 1.3.10 | 1.3.10 |1.13.7 | 7.1.12 | 3.4 | 0.3.4 | +#### PHP 7.2 + +| Docker Tag | GitHub Release | Nginx Version | PHP Version | Alpine Version | Container Scripts | +|-----|-------|-----|--------|--------|--------| +| 1.4.0 | 7.2.0 |1.13.2 | 7.2.0 | 3.6 | 0.3.5 | + These tags will be created as releases on GitHub and as tags in docker hub. ### Unmaintained tags: From 6a980f497d43fdd88616d5617b03f5cc933ee85b Mon Sep 17 00:00:00 2001 From: Harvey Date: Tue, 5 Dec 2017 18:17:37 +0000 Subject: [PATCH 02/90] add http2 to 7.2 version --- conf/nginx-site-ssl.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/nginx-site-ssl.conf b/conf/nginx-site-ssl.conf index 5a460b69..09f061ac 100644 --- a/conf/nginx-site-ssl.conf +++ b/conf/nginx-site-ssl.conf @@ -1,6 +1,6 @@ server { - listen 443 ssl; - listen [::]:443 ssl ipv6only=on; ## listen for ipv6 + listen 443 ssl http2; + listen [::]:443 ssl https2 ipv6only=on; ## listen for ipv6 root /var/www/html; index index.php index.html index.htm; From 60566f438614bd29c7f1eb8861c9c3c2603320d9 Mon Sep 17 00:00:00 2001 From: Harvey Date: Tue, 5 Dec 2017 21:19:47 +0000 Subject: [PATCH 03/90] update versions --- README.md | 2 +- docs/versioning.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8571731e..f92a0ec9 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on | Docker Tag | GitHub Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| | latest | Master Branch |1.13.7 | 7.1.12 | 3.4 | -| 1.4.0 | 7.2 Branch |1.13.7 | 7.2.0 | 3.6 | +| 1.4.1 | 7.2 Branch |1.13.7 | 7.2.0 | 3.6 | For other tags please see: [versioning](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 831d570b..5e23213b 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -48,6 +48,7 @@ The latest tag will always follow the master branch in git. the other versions w | Docker Tag | GitHub Release | Nginx Version | PHP Version | Alpine Version | Container Scripts | |-----|-------|-----|--------|--------|--------| | 1.4.0 | 7.2.0 |1.13.2 | 7.2.0 | 3.6 | 0.3.5 | +| 1.4.1 | 7.2.0 |1.13.2 | 7.2.0 | 3.6 | 0.3.6 | These tags will be created as releases on GitHub and as tags in docker hub. From a25774737cbbd739a939789efe85bc71f75cef49 Mon Sep 17 00:00:00 2001 From: Harvey Date: Mon, 23 Apr 2018 14:44:52 +0100 Subject: [PATCH 04/90] update to 7.2.4 --- Dockerfile | 6 +++--- README.md | 4 ++-- docs/versioning.md | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index c13da24d..6f2fa169 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.2.0-fpm-alpine +FROM php:7.2.4-fpm-alpine LABEL maintainer="Ric Harvey " @@ -6,8 +6,8 @@ ENV php_conf /usr/local/etc/php-fpm.conf ENV fpm_conf /usr/local/etc/php-fpm.d/www.conf ENV php_vars /usr/local/etc/php/conf.d/docker-vars.ini -ENV NGINX_VERSION 1.13.7 -ENV LUA_MODULE_VERSION 0.10.11 +ENV NGINX_VERSION 1.14.0 +ENV LUA_MODULE_VERSION 0.10.13 ENV DEVEL_KIT_MODULE_VERSION 0.3.0 ENV LUAJIT_LIB=/usr/lib ENV LUAJIT_INC=/usr/include/luajit-2.1 diff --git a/README.md b/README.md index f92a0ec9..190c2019 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | GitHub Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest | Master Branch |1.13.7 | 7.1.12 | 3.4 | -| 1.4.1 | 7.2 Branch |1.13.7 | 7.2.0 | 3.6 | +| latest | Master Branch |1.14.0 | 7.2.4 | 3.6 | +| 1.5.0 | 7.2 Branch |1.14.0 | 7.2.4 | 3.6 | For other tags please see: [versioning](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 5e23213b..37d6ecf0 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -49,6 +49,7 @@ The latest tag will always follow the master branch in git. the other versions w |-----|-------|-----|--------|--------|--------| | 1.4.0 | 7.2.0 |1.13.2 | 7.2.0 | 3.6 | 0.3.5 | | 1.4.1 | 7.2.0 |1.13.2 | 7.2.0 | 3.6 | 0.3.6 | +| 1.5.0 | 7.2.4 |1.14.0 | 7.2.4 | 3.6 | 0.3.6 | These tags will be created as releases on GitHub and as tags in docker hub. From f0cb1718f52c24ea5917c9e2fdb359aebc3c903f Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sun, 17 Jun 2018 21:35:26 +0100 Subject: [PATCH 05/90] update PHP to 7.2.6 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6f2fa169..9225a5c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.2.4-fpm-alpine +FROM php:7.2.6-fpm-alpine LABEL maintainer="Ric Harvey " From 67c48e67a92879c9bf529feda4e53756f918d382 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sun, 17 Jun 2018 21:40:07 +0100 Subject: [PATCH 06/90] Update links --- README.md | 52 ++++++++++++++++++------------------ docs/scripting_templating.md | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 190c2019..a0d0bb77 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ If you have improvements or suggestions please open an issue or pull request on | latest | Master Branch |1.14.0 | 7.2.4 | 3.6 | | 1.5.0 | 7.2 Branch |1.14.0 | 7.2.4 | 3.6 | -For other tags please see: [versioning](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/versioning.md) +For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) ### Links -- [https://github.com/richarvey/nginx-php-fpm](https://github.com/richarvey/nginx-php-fpm) +- [https://gitlab.com/ric_harvey/nginx-php-fpm](https://gitlab.com/ric_harvey/nginx-php-fpm) - [https://registry.hub.docker.com/u/richarvey/nginx-php-fpm/](https://registry.hub.docker.com/u/richarvey/nginx-php-fpm/) ## Quick Start @@ -38,29 +38,29 @@ You can then browse to ```http://``` to view the default install fi For more detailed examples and explanations please refer to the documentation. ## Documentation -- [Building from source](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/building.md) -- [Versioning](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/versioning.md) -- [Config Flags](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/config_flags.md) -- [Git Auth](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/git_auth.md) - - [Personal Access token](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/git_auth.md#personal-access-token) - - [SSH Keys](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/git_auth.md#ssh-keys) -- [Git Commands](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/git_commands.md) - - [Push](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/git_commands.md#push-code-to-git) - - [Pull](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/git_commands.md#pull-code-from-git-refresh) -- [Repository layout / webroot](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/repo_layout.md) - - [webroot](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/repo_layout.md#src--webroot) -- [User / Group Identifiers](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/UID_GID_Mapping.md) -- [Custom Nginx Config files](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/nginx_configs.md) - - [REAL IP / X-Forwarded-For Headers](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/nginx_configs.md#real-ip--x-forwarded-for-headers) -- [Scripting and Templating](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/scripting_templating.md) - - [Environment Variables](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/scripting_templating.md#using-environment-variables--templating) -- [Lets Encrypt Support](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/lets_encrypt.md) - - [Setup](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/lets_encrypt.md#setup) - - [Renewal](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/lets_encrypt.md#renewal) -- [PHP Modules](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/php_modules.md) -- [Xdebug](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/xdebug.md) -- [Logging and Errors](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/logs.md) +- [Building from source](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/building.md) +- [Versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) +- [Config Flags](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/config_flags.md) +- [Git Auth](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/git_auth.md) + - [Personal Access token](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/git_auth.md#personal-access-token) + - [SSH Keys](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/git_auth.md#ssh-keys) +- [Git Commands](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/git_commands.md) + - [Push](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/git_commands.md#push-code-to-git) + - [Pull](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/git_commands.md#pull-code-from-git-refresh) +- [Repository layout / webroot](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/repo_layout.md) + - [webroot](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/repo_layout.md#src--webroot) +- [User / Group Identifiers](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/UID_GID_Mapping.md) +- [Custom Nginx Config files](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/nginx_configs.md) + - [REAL IP / X-Forwarded-For Headers](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/nginx_configs.md#real-ip--x-forwarded-for-headers) +- [Scripting and Templating](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/scripting_templating.md) + - [Environment Variables](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/scripting_templating.md#using-environment-variables--templating) +- [Lets Encrypt Support](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/lets_encrypt.md) + - [Setup](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/lets_encrypt.md#setup) + - [Renewal](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/lets_encrypt.md#renewal) +- [PHP Modules](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/php_modules.md) +- [Xdebug](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/xdebug.md) +- [Logging and Errors](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/logs.md) ## Guides -- [Running in Kubernetes](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/guides/kubernetes.md) -- [Using Docker Compose](https://github.com/richarvey/nginx-php-fpm/blob/master/docs/guides/docker_compose.md) +- [Running in Kubernetes](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/guides/kubernetes.md) +- [Using Docker Compose](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/guides/docker_compose.md) diff --git a/docs/scripting_templating.md b/docs/scripting_templating.md index 5eefc29a..02ab7153 100644 --- a/docs/scripting_templating.md +++ b/docs/scripting_templating.md @@ -1,5 +1,5 @@ ## Scripting -There is often an occasion where you need to run a script on code to do a transformation once code lands in the container. For this reason we have developed scripting support. By including a scripts folder in your git repository and passing the __RUN_SCRIPTS=1__ flag to your command line the container will execute your scripts. Please see the [repo layout guidelines](https://github.com/ngineered/nginx-php-fpm/blob/master/docs/repo_layout.md) for more details on how to organise this. +There is often an occasion where you need to run a script on code to do a transformation once code lands in the container. For this reason we have developed scripting support. By including a scripts folder in your git repository and passing the __RUN_SCRIPTS=1__ flag to your command line the container will execute your scripts. Please see the [repo layout guidelines](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/repo_layout.md) for more details on how to organise this. ## Using environment variables / templating To set the variables pass them in as environment variables on the docker command line. From 6a018f0d0d5320ba24db10a847fcf2c2ef3f21b9 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sun, 17 Jun 2018 21:41:57 +0100 Subject: [PATCH 07/90] update versions in repo --- README.md | 6 +++--- docs/versioning.md | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a0d0bb77..45d96557 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ This is a Dockerfile/image to build a container for nginx and php-fpm, with the If you have improvements or suggestions please open an issue or pull request on the GitHub project page. ### Versioning -| Docker Tag | GitHub Release | Nginx Version | PHP Version | Alpine Version | +| Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest | Master Branch |1.14.0 | 7.2.4 | 3.6 | -| 1.5.0 | 7.2 Branch |1.14.0 | 7.2.4 | 3.6 | +| latest | Master Branch |1.14.0 | 7.2.6 | 3.6 | +| 1.5.1 | 7.2 Branch |1.14.0 | 7.2.6 | 3.6 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 37d6ecf0..96a22e39 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -13,9 +13,18 @@ We will use the [semver](http://ricostacruz.com/cheatsheets/semver.html) style n The latest tag will always follow the master branch in git. the other versions will have releases attached. +#### PHP 7.2 + +| Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | Container Scripts | +|-----|-------|-----|--------|--------|--------| +| 1.4.0 | 7.2.0 |1.13.2 | 7.2.0 | 3.6 | 0.3.5 | +| 1.4.1 | 7.2.0 |1.13.2 | 7.2.0 | 3.6 | 0.3.6 | +| 1.5.0 | 7.2.4 |1.14.0 | 7.2.4 | 3.6 | 0.3.6 | +| 1.5.1 | 7.2.6 |1.14.0 | 7.2.4 | 3.6 | 0.3.6 | + #### PHP 7.1 -| Docker Tag | GitHub Release | Nginx Version | PHP Version | Alpine Version | Container Scripts | +| Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | Container Scripts | |-----|-------|-----|--------|--------|--------| | latest | Master Branch |1.13.2 | 7.1.7 | 3.4 | 0.2.9 | | 1.1.1 | 1.1.1 |1.11.9 | 7.1.1 | 3.4 | 0.2.5 | @@ -43,14 +52,6 @@ The latest tag will always follow the master branch in git. the other versions w | 1.3.9 | 1.3.9 |1.13.7 | 7.1.11 | 3.4 | 0.3.3 | | 1.3.10 | 1.3.10 |1.13.7 | 7.1.12 | 3.4 | 0.3.4 | -#### PHP 7.2 - -| Docker Tag | GitHub Release | Nginx Version | PHP Version | Alpine Version | Container Scripts | -|-----|-------|-----|--------|--------|--------| -| 1.4.0 | 7.2.0 |1.13.2 | 7.2.0 | 3.6 | 0.3.5 | -| 1.4.1 | 7.2.0 |1.13.2 | 7.2.0 | 3.6 | 0.3.6 | -| 1.5.0 | 7.2.4 |1.14.0 | 7.2.4 | 3.6 | 0.3.6 | - These tags will be created as releases on GitHub and as tags in docker hub. ### Unmaintained tags: From 11fb46217861674afc8754cc9e6d8a32e49305e8 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sun, 17 Jun 2018 21:52:12 +0100 Subject: [PATCH 08/90] add build script --- .gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..9fe16b88 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,9 @@ +before_script: + - echo Logging in to Docker Hub... + - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" + +job: + script: + - echo Build started on `date` + - docker build -t richarvey/nginx-php-fpm:latest + - docker push richarvey/nginx-php-fpm:latest From 7e9a379e0e53fff334a396d4e1b057b9be0b7b22 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sun, 17 Jun 2018 22:05:51 +0100 Subject: [PATCH 09/90] fix ci/cd --- .gitlab-ci.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9fe16b88..f650afa9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,18 @@ +image: docker:latest + +services: + - docker:dind + +stages: + - build + before_script: - echo Logging in to Docker Hub... - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" -job: +build: + stage: build script: - - echo Build started on `date` - - docker build -t richarvey/nginx-php-fpm:latest - - docker push richarvey/nginx-php-fpm:latest + - echo Build started on `date` + - docker build -t richarvey/nginx-php-fpm:latest . + - docker push richarvey/nginx-php-fpm:latest From 6b2bd38ac73049ec638f7fba4707e70843c2ecb5 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sun, 17 Jun 2018 22:19:47 +0100 Subject: [PATCH 10/90] remove quotes --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f650afa9..f9d34ac3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ stages: before_script: - echo Logging in to Docker Hub... - - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" + - docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD build: stage: build From c70242a1ccafe457a9e1ff0844918828f79914ba Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sun, 17 Jun 2018 22:35:19 +0100 Subject: [PATCH 11/90] tweak login line --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f9d34ac3..8dd148e2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ stages: before_script: - echo Logging in to Docker Hub... - - docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD + - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD richarvey build: stage: build From ed8d3a1e1672276fab04665b341ac512d5f31416 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sun, 17 Jun 2018 22:49:20 +0100 Subject: [PATCH 12/90] final test before i rtfm --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8dd148e2..b131bb61 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ stages: before_script: - echo Logging in to Docker Hub... - - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD richarvey + - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD build: stage: build From 7448ba4595c2f8bb131733c7dfe2a73a174b0554 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sun, 17 Jun 2018 22:52:09 +0100 Subject: [PATCH 13/90] try with = --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b131bb61..f9f2fb33 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,4 @@ image: docker:latest - services: - docker:dind @@ -8,7 +7,7 @@ stages: before_script: - echo Logging in to Docker Hub... - - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + - docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD build: stage: build From 856b5a6c50bbfec15fcda24a963eb890b7f0fe3b Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sun, 17 Jun 2018 22:54:20 +0100 Subject: [PATCH 14/90] use --password-stdin --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f9f2fb33..6c4c6942 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ stages: before_script: - echo Logging in to Docker Hub... - - docker login -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD + - docker login -u=$DOCKER_USERNAME --password-stdin=$DOCKER_PASSWORD build: stage: build From 9ae01358d75fcbd7755a2cc600bd467f3f414368 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sun, 17 Jun 2018 22:56:39 +0100 Subject: [PATCH 15/90] mix of everything --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6c4c6942..9744d8d7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ stages: before_script: - echo Logging in to Docker Hub... - - docker login -u=$DOCKER_USERNAME --password-stdin=$DOCKER_PASSWORD + - docker login -u richarvey --password-stdin="$DOCKER_PASSWORD" build: stage: build From 8dcf6aa5bd4ee75bba610b7413b278a9e493e149 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sun, 17 Jun 2018 22:59:20 +0100 Subject: [PATCH 16/90] long format --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9744d8d7..901fd88a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ stages: before_script: - echo Logging in to Docker Hub... - - docker login -u richarvey --password-stdin="$DOCKER_PASSWORD" + - docker login -username richarvey --password-stdin $DOCKER_PASSWORD build: stage: build From ac9c7024b4e126bdf8fd49beadfb73f3e7813b95 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 18 Jun 2018 18:14:49 +0100 Subject: [PATCH 17/90] modify docker login to include index --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 901fd88a..42dd360e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,8 @@ stages: before_script: - echo Logging in to Docker Hub... - - docker login -username richarvey --password-stdin $DOCKER_PASSWORD + - docker login -u $USER -p $PASS index.docker.io + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY build: stage: build From 292a811febc13291894326a88c07d738c6406251 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 18 Jun 2018 18:17:29 +0100 Subject: [PATCH 18/90] remove other login! --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 42dd360e..153c56f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,6 @@ stages: before_script: - echo Logging in to Docker Hub... - - docker login -u $USER -p $PASS index.docker.io - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY build: From e60506816fd8701650477e7d2101f877862bf24e Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 18 Jun 2018 18:38:00 +0100 Subject: [PATCH 19/90] try and match tag/branch --- .gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 153c56f4..7ef202b0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,7 @@ before_script: build: stage: build script: - - echo Build started on `date` - - docker build -t richarvey/nginx-php-fpm:latest . - - docker push richarvey/nginx-php-fpm:latest + - echo Build started on `date` for $CI_COMMIT_REF_NAME + - f [[ "$CI_REGISTRY" =~ "master" ]]; then export build=latest else build=$CI_REGISTRY fi + - docker build -t richarvey/nginx-php-fpm:"$build" . + - docker push richarvey/nginx-php-fpm:"$build" From 0adc03db28db906d7c05e74c82460194048f264a Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 18 Jun 2018 18:39:24 +0100 Subject: [PATCH 20/90] fix typo --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ef202b0..8e2149bb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,6 @@ build: stage: build script: - echo Build started on `date` for $CI_COMMIT_REF_NAME - - f [[ "$CI_REGISTRY" =~ "master" ]]; then export build=latest else build=$CI_REGISTRY fi + - if [[ "$CI_REGISTRY" =~ "master" ]]; then export build=latest else build=$CI_REGISTRY fi - docker build -t richarvey/nginx-php-fpm:"$build" . - docker push richarvey/nginx-php-fpm:"$build" From f2f09a83b05ef448f972aed9e9584ccac174c504 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 18 Jun 2018 18:41:09 +0100 Subject: [PATCH 21/90] add done --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8e2149bb..9b115abe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,6 @@ build: stage: build script: - echo Build started on `date` for $CI_COMMIT_REF_NAME - - if [[ "$CI_REGISTRY" =~ "master" ]]; then export build=latest else build=$CI_REGISTRY fi + - if [[ "$CI_REGISTRY" =~ "master" ]]; then export build=latest done else build=$CI_REGISTRY fi - docker build -t richarvey/nginx-php-fpm:"$build" . - docker push richarvey/nginx-php-fpm:"$build" From 845eb2dd43cad0d57c905a7585943db5902af13d Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 18 Jun 2018 18:47:02 +0100 Subject: [PATCH 22/90] fix name logic --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9b115abe..a112f684 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,6 @@ build: stage: build script: - echo Build started on `date` for $CI_COMMIT_REF_NAME - - if [[ "$CI_REGISTRY" =~ "master" ]]; then export build=latest done else build=$CI_REGISTRY fi + - if [[ "$CI_COMMIT_REF_NAME" =~ "master" ]]; then export build=latest; else export build=$CI_COMMIT_REF_NAME; fi - docker build -t richarvey/nginx-php-fpm:"$build" . - docker push richarvey/nginx-php-fpm:"$build" From f7417bafc55dd60de1ebe3830829e2b40a1e2c83 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 18 Jun 2018 19:02:43 +0100 Subject: [PATCH 23/90] fox no login issue --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a112f684..ff2c3f26 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ stages: - build before_script: - - echo Logging in to Docker Hub... + - echo Logging in to $CI_REGISTRY... - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY build: @@ -15,4 +15,4 @@ build: - echo Build started on `date` for $CI_COMMIT_REF_NAME - if [[ "$CI_COMMIT_REF_NAME" =~ "master" ]]; then export build=latest; else export build=$CI_COMMIT_REF_NAME; fi - docker build -t richarvey/nginx-php-fpm:"$build" . - - docker push richarvey/nginx-php-fpm:"$build" + - docker push "$CI_REGISTRY"/richarvey/nginx-php-fpm:"$build" From ee1a725a39e23cc79c60e250dd3d711caddb61f0 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 18 Jun 2018 22:14:48 +0100 Subject: [PATCH 24/90] try login in new place --- .gitlab-ci.yml | 1 + README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ff2c3f26..6dedcf33 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,5 +14,6 @@ build: script: - echo Build started on `date` for $CI_COMMIT_REF_NAME - if [[ "$CI_COMMIT_REF_NAME" =~ "master" ]]; then export build=latest; else export build=$CI_COMMIT_REF_NAME; fi + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker build -t richarvey/nginx-php-fpm:"$build" . - docker push "$CI_REGISTRY"/richarvey/nginx-php-fpm:"$build" diff --git a/README.md b/README.md index 45d96557..e28e50ff 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![pipeline status](https://gitlab.com/ric_harvey/nginx-php-fpm/badges/master/pipeline.svg)](https://gitlab.com/ric_harvey/nginx-php-fpm/commits/master) ![docker hub](https://img.shields.io/docker/pulls/richarvey/nginx-php-fpm.svg?style=flat-square) ![docker hub](https://img.shields.io/docker/stars/richarvey/nginx-php-fpm.svg?style=flat-square) From c9256c5f23818faaf6cc4e7f0b030585cd2a0266 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 18 Jun 2018 23:07:32 +0100 Subject: [PATCH 25/90] add some debug --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6dedcf33..16503652 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,7 @@ stages: before_script: - echo Logging in to $CI_REGISTRY... - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - docker info | grep Registry build: stage: build @@ -16,4 +17,5 @@ build: - if [[ "$CI_COMMIT_REF_NAME" =~ "master" ]]; then export build=latest; else export build=$CI_COMMIT_REF_NAME; fi - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker build -t richarvey/nginx-php-fpm:"$build" . - - docker push "$CI_REGISTRY"/richarvey/nginx-php-fpm:"$build" + - docker info | grep Registry + - docker push "$CI_REGISTRY_IMAGE":"$build" From b1902deda3ffed33117909b90490a4d6e495d6e8 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 18 Jun 2018 23:17:55 +0100 Subject: [PATCH 26/90] more debug --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 16503652..6948289e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,7 @@ build: script: - echo Build started on `date` for $CI_COMMIT_REF_NAME - if [[ "$CI_COMMIT_REF_NAME" =~ "master" ]]; then export build=latest; else export build=$CI_COMMIT_REF_NAME; fi - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker build -t richarvey/nginx-php-fpm:"$build" . - docker info | grep Registry + - docker images - docker push "$CI_REGISTRY_IMAGE":"$build" From d529d14e6e6e4fdbf4029d0210d08ad6d40add40 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 18 Jun 2018 23:30:59 +0100 Subject: [PATCH 27/90] split jobs --- .gitlab-ci.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6948289e..447a5ae3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,19 +3,30 @@ services: - docker:dind stages: - - build + - build_latest + - build_tags before_script: - echo Logging in to $CI_REGISTRY... - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker info | grep Registry -build: - stage: build +build_latest: + stage: build_latest script: - echo Build started on `date` for $CI_COMMIT_REF_NAME - - if [[ "$CI_COMMIT_REF_NAME" =~ "master" ]]; then export build=latest; else export build=$CI_COMMIT_REF_NAME; fi - - docker build -t richarvey/nginx-php-fpm:"$build" . - - docker info | grep Registry + - docker build -t richarvey/nginx-php-fpm:latest . - docker images - - docker push "$CI_REGISTRY_IMAGE":"$build" + - docker push "$CI_REGISTRY_IMAGE":latest + only: + - master + +build_tags: + stage: build_tags + script: + - echo Build started on `date` for $CI_COMMIT_REF_NAME + - docker build -t richarvey/nginx-php-fpm:"$CI_COMMIT_REF_NAME" . + - docker images + - docker push "$CI_REGISTRY_IMAGE":"$CI_COMMIT_REF_NAME" + only: + - tags From 0ea283fb2c07418f3c08bbc6cd60d0b3c35c5d8b Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 18 Jun 2018 23:41:07 +0100 Subject: [PATCH 28/90] change login line --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 447a5ae3..66f8c527 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ stages: before_script: - echo Logging in to $CI_REGISTRY... - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" - docker info | grep Registry build_latest: From 8049fb8324264301e66046c5f8bcf39fc4735466 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 19 Jun 2018 00:15:59 +0100 Subject: [PATCH 29/90] fix from hebitrock @ github --- docs/guides/docker_compose.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/docker_compose.md b/docs/guides/docker_compose.md index 8e769ac4..6a9e68be 100644 --- a/docs/guides/docker_compose.md +++ b/docs/guides/docker_compose.md @@ -15,7 +15,7 @@ services: restart: always environment: SSH_KEY: '' - GIT_REPO: 'git@github.com://.git' GIT_EMAIL: 'void@ngd.io' GIT_NAME: '' ``` From 15ccfe1267a421a922ec4d6c113b8ed47d34131f Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 19 Jun 2018 00:17:22 +0100 Subject: [PATCH 30/90] added xdebug from Thaine Rowley @ githubwq --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9225a5c6..e82444e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -196,7 +196,7 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo #curl iconv session #docker-php-ext-install pdo_mysql pdo_sqlite mysqli mcrypt gd exif intl xsl json soap dom zip opcache && \ docker-php-ext-install iconv pdo_mysql pdo_sqlite mysqli gd exif intl xsl json soap dom zip opcache && \ - #pecl install xdebug && \ + pecl install xdebug-2.6.0 && \ docker-php-source delete && \ mkdir -p /etc/nginx && \ mkdir -p /var/www/app && \ From b2ff931eb230b7b1c04c487d2b0cf06f9abe7769 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 19 Jun 2018 00:19:13 +0100 Subject: [PATCH 31/90] switch to libre-sslwq --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e82444e0..142a7659 100644 --- a/Dockerfile +++ b/Dockerfile @@ -72,7 +72,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ gcc \ libc-dev \ make \ - openssl-dev \ + libressl-dev \ pcre-dev \ zlib-dev \ linux-headers \ @@ -171,7 +171,7 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo python-dev \ py-pip \ augeas-dev \ - openssl-dev \ + libressl-dev \ ca-certificates \ dialog \ autoconf \ From a2768df69090f245fa356b3fa02118bde68f849b Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 19 Jun 2018 00:22:07 +0100 Subject: [PATCH 32/90] readme fix from b1rdex @ github --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e28e50ff..34fbb020 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,8 @@ For more detailed examples and explanations please refer to the documentation. - [Versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) - [Config Flags](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/config_flags.md) - [Git Auth](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/git_auth.md) - - [Personal Access token](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/git_auth.md#personal-access-token) - - [SSH Keys](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/git_auth.md#ssh-keys) + - [Personal Access token](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/git_auth.md#personal-access-token) + - [SSH Keys](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/git_auth.md#ssh-keys) - [Git Commands](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/git_commands.md) - [Push](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/git_commands.md#push-code-to-git) - [Pull](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/git_commands.md#pull-code-from-git-refresh) From 1836953c43757dba1ef574028a9f01108f44eacd Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 19 Jun 2018 00:24:21 +0100 Subject: [PATCH 33/90] http2 fix by Jonax @ github --- conf/nginx-site-ssl.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx-site-ssl.conf b/conf/nginx-site-ssl.conf index 09f061ac..1bdf6e81 100644 --- a/conf/nginx-site-ssl.conf +++ b/conf/nginx-site-ssl.conf @@ -1,6 +1,6 @@ server { listen 443 ssl http2; - listen [::]:443 ssl https2 ipv6only=on; ## listen for ipv6 + listen [::]:443 ssl http2 ipv6only=on; ## listen for ipv6 root /var/www/html; index index.php index.html index.htm; From 17c77147eaa8e3fa61465b7dc94ce35ca69c3e68 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 19 Jun 2018 10:56:24 +0100 Subject: [PATCH 34/90] adding awesome tag/commit pull feature by Jaesin @ github --- docs/config_flags.md | 2 ++ scripts/start.sh | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/docs/config_flags.md b/docs/config_flags.md index a8d62efd..c1b8a6bf 100644 --- a/docs/config_flags.md +++ b/docs/config_flags.md @@ -7,6 +7,8 @@ The following flags are a list of all the currently supported options that can b |--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | GIT_REPO | URL to the repository containing your source code. If you are using a personal token, this is the https URL without `https://` (e.g `github.com/project/`). For ssh prepend with `git@` (e.g `git@github.com/project.git`) | | GIT_BRANCH | Select a specific branch (optional) | +| GIT_TAG | Specify a specific git tag (optional) | +| GIT_COMMIT | Specify a specific git commit (optional) | | GIT_EMAIL | Set your email for code pushing (required for git to work) | | GIT_NAME | Set your name for code pushing (required for git to work) | | GIT_USE_SSH | Set this to 1 if you want to use git over SSH (instead of HTTP), useful if you want to use Bitbucket instead of GitHub | diff --git a/scripts/start.sh b/scripts/start.sh index 199276dd..61c7e2db 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -58,6 +58,12 @@ if [ ! -d "/var/www/html/.git" ]; then fi fi ${GIT_COMMAND} /var/www/html || exit 1 + if [ ! -z "$GIT_TAG" ]; then + git checkout ${GIT_TAG} || exit 1 + fi + if [ ! -z "$GIT_COMMIT" ]; then + git checkout ${GIT_COMMIT} || exit 1 + fi if [ -z "$SKIP_CHOWN" ]; then chown -Rf nginx.nginx /var/www/html fi From 11a553aad6e14c37c4d99d1f2f816f0cca69a515 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 19 Jun 2018 11:04:48 +0100 Subject: [PATCH 35/90] Prep doc fo 1.5.2 release --- README.md | 4 ++-- docs/versioning.md | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 34fbb020..c559d495 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest | Master Branch |1.14.0 | 7.2.6 | 3.6 | -| 1.5.1 | 7.2 Branch |1.14.0 | 7.2.6 | 3.6 | +| latest | Master Branch |1.14.0 | 7.2.6 | 3.7 | +| 1.5.2 | 7.2 Branch |1.14.0 | 7.2.6 | 3.7 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 96a22e39..963ef172 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -20,8 +20,12 @@ The latest tag will always follow the master branch in git. the other versions w | 1.4.0 | 7.2.0 |1.13.2 | 7.2.0 | 3.6 | 0.3.5 | | 1.4.1 | 7.2.0 |1.13.2 | 7.2.0 | 3.6 | 0.3.6 | | 1.5.0 | 7.2.4 |1.14.0 | 7.2.4 | 3.6 | 0.3.6 | -| 1.5.1 | 7.2.6 |1.14.0 | 7.2.4 | 3.6 | 0.3.6 | +| 1.5.1 | 7.2.6 |1.14.0 | 7.2.4 | 3.7 | 0.3.6 | +| 1.5.2 | 7.2.6 |1.14.0 | 7.2.4 | 3.7 | 0.3.7 | +These tags will be created on GitLab and as tags in docker hub. + +### Unmaintained tags: #### PHP 7.1 | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | Container Scripts | @@ -52,9 +56,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.3.9 | 1.3.9 |1.13.7 | 7.1.11 | 3.4 | 0.3.3 | | 1.3.10 | 1.3.10 |1.13.7 | 7.1.12 | 3.4 | 0.3.4 | -These tags will be created as releases on GitHub and as tags in docker hub. - -### Unmaintained tags: +### Legacy tags: - php5 - php7 From 0063728e48fc02e910587cad9eb376a90a9a775e Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Fri, 29 Jun 2018 10:36:46 +0100 Subject: [PATCH 36/90] PHP 7.2.7 release --- Dockerfile | 2 +- README.md | 4 ++-- docs/versioning.md | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 142a7659..d67f5f48 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.2.6-fpm-alpine +FROM php:7.2.7-fpm-alpine LABEL maintainer="Ric Harvey " diff --git a/README.md b/README.md index c559d495..0e5cc31e 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest | Master Branch |1.14.0 | 7.2.6 | 3.7 | -| 1.5.2 | 7.2 Branch |1.14.0 | 7.2.6 | 3.7 | +| latest | Master Branch |1.14.0 | 7.2.7 | 3.7 | +| 1.5.3 | 7.2 Branch |1.14.0 | 7.2.7 | 3.7 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 963ef172..7342daf7 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -22,6 +22,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.5.0 | 7.2.4 |1.14.0 | 7.2.4 | 3.6 | 0.3.6 | | 1.5.1 | 7.2.6 |1.14.0 | 7.2.4 | 3.7 | 0.3.6 | | 1.5.2 | 7.2.6 |1.14.0 | 7.2.4 | 3.7 | 0.3.7 | +| 1.5.3 | 7.2.7 |1.14.0 | 7.2.4 | 3.7 | 0.3.7 | These tags will be created on GitLab and as tags in docker hub. From daf419122ac74731f38efb340b4f3864410c72b5 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Fri, 29 Jun 2018 22:10:35 +0100 Subject: [PATCH 37/90] tidy up docker file and apk command --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d67f5f48..67bde3e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -159,8 +159,9 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \ echo /etc/apk/respositories && \ - apk update && \ - apk add --no-cache bash \ + apk update && apk upgrade &&\ + apk add --no-cache --virtual .sys-deps \ + bash \ openssh-client \ wget \ supervisor \ @@ -210,7 +211,8 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo pip install -U pip && \ pip install -U certbot && \ mkdir -p /etc/letsencrypt/webrootauth && \ - apk del gcc musl-dev linux-headers libffi-dev augeas-dev python-dev make autoconf +# apk del gcc musl-dev linux-headers libffi-dev augeas-dev python-dev make autoconf && \ + apk del .sys-deps # ln -s /usr/bin/php7 /usr/bin/php ADD conf/supervisord.conf /etc/supervisord.conf From bcbe15e85bb385d0181e7aa106041f9f450f3ec9 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Fri, 29 Jun 2018 23:13:35 +0100 Subject: [PATCH 38/90] Remove unused travis tests --- .travis.yml | 22 --------- .travis/requirements.txt | 1 - .travis/tests.py | 22 --------- .travis/tests/functional/test_content.py | 62 ------------------------ 4 files changed, 107 deletions(-) delete mode 100644 .travis.yml delete mode 100644 .travis/requirements.txt delete mode 100644 .travis/tests.py delete mode 100644 .travis/tests/functional/test_content.py diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a8fc0523..00000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: python -python: - - 2.7 - -services: - - docker - -install: - - docker build -t php . - - docker run -d -p 127.0.0.1:80:80 --name nginx-php-fpm php - -before_script: - - pip install -r .travis/requirements.txt - -script: - - docker ps - - sleep 5 - - curl -I 127.0.0.1:80 - - python .travis/tests.py - -notifications: - slack: ngineered:EIKJFrzibOe0TwUhLXNe8Q2Q diff --git a/.travis/requirements.txt b/.travis/requirements.txt deleted file mode 100644 index f2293605..00000000 --- a/.travis/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -requests diff --git a/.travis/tests.py b/.travis/tests.py deleted file mode 100644 index 8f494e7c..00000000 --- a/.travis/tests.py +++ /dev/null @@ -1,22 +0,0 @@ -''' test runner ''' - -import unittest -import sys - -def run_functional_tests(): - ''' Execute Functional Tests ''' - tests = unittest.TestLoader().discover('.travis/tests/functional') - result = unittest.TextTestRunner(verbosity=2).run(tests) - return result.wasSuccessful() - -if __name__ == '__main__': - - print "#" * 70 - print "Test Runner: Functional tests" - print "#" * 70 - functional_results = run_functional_tests() - - if functional_results: - sys.exit(0) - else: - sys.exit(1) diff --git a/.travis/tests/functional/test_content.py b/.travis/tests/functional/test_content.py deleted file mode 100644 index 769f491f..00000000 --- a/.travis/tests/functional/test_content.py +++ /dev/null @@ -1,62 +0,0 @@ -''' Crawl site and validate every page renders somewhat correctly ''' -import unittest -import re -import requests - -class ContentTest(unittest.TestCase): - ''' Run a functional test to validate content being served ''' - - def setUp(self): - ''' Create some starter data to be used in tests ''' - self.domain = "http://127.0.0.1" - self.search_string = "Version" - - def tearDown(self): - ''' Destroy starter data ''' - self.domain = None - self.search_string = "None" - - def request_recurse(self, url, requested=None): - ''' recursively request each page checking the return code and urls ''' - counts = { - 'pass' : 0, - 'fail' : 0, - } - if requested is None: - requested = [] - if url in requested: - return counts, requested - else: - requested.append(url) - url = self.domain + url - results = requests.get(url, allow_redirects=True, verify=False) - if self.search_string in results.text: - counts['pass'] = counts['pass'] + 1 - else: - counts['fail'] = counts['fail'] + 1 - urls = re.findall( - 'href="/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', - results.text - ) - for url in urls: - url = url.lstrip('href="') - if "/static/" not in url: - if "//" not in url: - results, requested = self.request_recurse(url, requested=requested) - # Add counts for status codes - for key in results.keys(): - if key in counts: - counts[key] = counts[key] + results[key] - else: - counts[key] = results[key] - return counts, requested - -class CrawlSite(ContentTest): - ''' Verify no broken links are present within blog ''' - def runTest(self): - ''' Execute recursive request ''' - results, requested_pages = self.request_recurse("/") - self.assertFalse( - results['fail'] > 0, - "Found {0} pages that did not return keyword".format(results['fail']) - ) From 51bbf4e04f61873dfeae69e943fcdf0a900f2589 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sat, 30 Jun 2018 22:42:35 +0100 Subject: [PATCH 39/90] Tidy up 404 and fix php logging to stdout --- Dockerfile | 7 +- README.md | 2 +- TODO.md | 5 - conf/nginx-site.conf | 13 +- conf/supervisord.conf | 6 +- docs/versioning.md | 1 + errors/404.html | 39 +---- errors/gitlab.svg | 1 + errors/style.css | 398 ------------------------------------------ errors/twitter.svg | 1 + src/index.php | 2 + 11 files changed, 31 insertions(+), 444 deletions(-) delete mode 100644 TODO.md create mode 100644 errors/gitlab.svg delete mode 100644 errors/style.css create mode 100644 errors/twitter.svg diff --git a/Dockerfile b/Dockerfile index 67bde3e7..c16266c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -160,7 +160,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \ echo /etc/apk/respositories && \ apk update && apk upgrade &&\ - apk add --no-cache --virtual .sys-deps \ + apk add --no-cache \ bash \ openssh-client \ wget \ @@ -211,8 +211,8 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo pip install -U pip && \ pip install -U certbot && \ mkdir -p /etc/letsencrypt/webrootauth && \ -# apk del gcc musl-dev linux-headers libffi-dev augeas-dev python-dev make autoconf && \ - apk del .sys-deps + apk del gcc musl-dev linux-headers libffi-dev augeas-dev python-dev make autoconf +# apk del .sys-deps # ln -s /usr/bin/php7 /usr/bin/php ADD conf/supervisord.conf /etc/supervisord.conf @@ -271,4 +271,5 @@ ADD errors/ /var/www/errors EXPOSE 443 80 +WORKDIR ["/"] CMD ["/start.sh"] diff --git a/README.md b/README.md index 0e5cc31e..4acf179c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you have improvements or suggestions please open an issue or pull request on | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| | latest | Master Branch |1.14.0 | 7.2.7 | 3.7 | -| 1.5.3 | 7.2 Branch |1.14.0 | 7.2.7 | 3.7 | +| 1.5.4 | 7.2 Branch |1.14.0 | 7.2.7 | 3.7 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 2f5e0e36..00000000 --- a/TODO.md +++ /dev/null @@ -1,5 +0,0 @@ -## To Do List - -- Docker swarm guide -- AWS ECS guide -- Kubernetes guide diff --git a/conf/nginx-site.conf b/conf/nginx-site.conf index 31a967b2..4d9c6a6e 100644 --- a/conf/nginx-site.conf +++ b/conf/nginx-site.conf @@ -31,13 +31,16 @@ server { internal; } - location ^~ /ngd-style.css { - alias /var/www/errors/style.css; + location ^~ /sad.svg { + alias /var/www/errors/sad.svg; access_log off; } - - location ^~ /ngd-sad.svg { - alias /var/www/errors/sad.svg; + location ^~ /twitter.svg { + alias /var/www/errors/twitter.svg; + access_log off; + } + location ^~ /gitlab.svg { + alias /var/www/errors/gitlab.svg; access_log off; } diff --git a/conf/supervisord.conf b/conf/supervisord.conf index d4c1da68..889087ee 100644 --- a/conf/supervisord.conf +++ b/conf/supervisord.conf @@ -22,14 +22,17 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface serverurl=unix:///dev/shm/supervisor.sock ; use a unix:// URL for a unix socket [program:php-fpm] -command = /usr/local/sbin/php-fpm --nodaemonize --fpm-config /usr/local/etc/php-fpm.d/www.conf +command = /usr/local/sbin/php-fpm --force-stderr --nodaemonize --fpm-config /usr/local/etc/php-fpm.d/www.conf autostart=true autorestart=true priority=5 +stdout_events_enabled=true +stderr_events_enabled=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 +stopsignal=QUIT [program:nginx] command=/usr/sbin/nginx -g "daemon off; error_log /dev/stderr info;" @@ -42,6 +45,7 @@ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 +stopsignal=QUIT [include] files = /etc/supervisor/conf.d/*.conf diff --git a/docs/versioning.md b/docs/versioning.md index 7342daf7..bf82a29d 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -23,6 +23,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.5.1 | 7.2.6 |1.14.0 | 7.2.4 | 3.7 | 0.3.6 | | 1.5.2 | 7.2.6 |1.14.0 | 7.2.4 | 3.7 | 0.3.7 | | 1.5.3 | 7.2.7 |1.14.0 | 7.2.4 | 3.7 | 0.3.7 | +| 1.5.4 | 7.2.7 |1.14.0 | 7.2.4 | 3.7 | 0.3.8 | These tags will be created on GitLab and as tags in docker hub. diff --git a/errors/404.html b/errors/404.html index 1c3db7a3..4c33c479 100644 --- a/errors/404.html +++ b/errors/404.html @@ -2,38 +2,15 @@ - - + + Error - 404 - -
- -
- -

Error: 404

-

Looks like we can't find that page

-
-
- + + +
+

Page not Found

+ Gitlab + Twitter diff --git a/errors/gitlab.svg b/errors/gitlab.svg new file mode 100644 index 00000000..ad4c30cb --- /dev/null +++ b/errors/gitlab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/errors/style.css b/errors/style.css deleted file mode 100644 index 188e98ce..00000000 --- a/errors/style.css +++ /dev/null @@ -1,398 +0,0 @@ -/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ - -img { - border: 0; -} - -body,html { - min-height: 100%; - height: 100%; -} - -figure,footer,nav,section { - display: block; -} - -[hidden] { - display: none; -} - -html { - font-family: sans-serif; - -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; -} - -body,figure { - margin: 0; -} - -a { - background: 0 0; -} - -a:focus { - outline: dotted thin; -} - -a:active,a:hover { - outline: 0; -} - -h1 { - margin: .67em 0; -} - -code { - font-family: monospace, serif; - font-size: 1em; -} - -svg:not(:root) { - overflow: hidden; -} - -.navbar { - -ms-box-sizing: border-box; - -o-box-sizing: border-box; - -khtml-box-sizing: border-box; -} - -.navbar-container { - border-bottom: 1px solid #EBEBEB; -} - -/*! - Ionicons, v2.0.0 - Created by Ben Sperry for the Ionic Framework, http://ionicons.com/ - https://twitter.com/benjsperry https://twitter.com/ionicframework - MIT License: https://github.com/driftyco/ionicons - - Android-style icons originally built by Google’s - Material Design Icons: https://github.com/google/material-design-icons - used under CC BY http://creativecommons.org/licenses/by/4.0/ - Modified icons to fit ionicon’s grid from original. -*/ - -@font-face { - font-family: Ionicons; - src: url(../fonts/ionicons/ionicons.eot?v=2.0.0); - src: url(../fonts/ionicons/ionicons.eot?v=2.0.0#iefix) format("embedded-opentype"), url(../fonts/ionicons/ionicons.ttf?v=2.0.0) format("truetype"), url(../fonts/ionicons/ionicons.woff?v=2.0.0) format("woff"), url(../fonts/ionicons/ionicons.svg?v=2.0.0#Ionicons) format("svg"); - font-weight: 400; - font-style: normal; -} - -.ion,.ion-code:before,.ion-link:before,.ion-sad:before,.ion-social-chrome:before,.ion-social-css3:before,.ion-social-github:before,.ion-social-html5:before,.ion-social-twitter:before,.ionicons { - display: inline-block; - font-family: Ionicons; - speak: none; - font-style: normal; - font-weight: 400; - font-variant: normal; - text-transform: none; - text-rendering: auto; - line-height: 1; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.ion-code:before { - content: ""; -} - -.ion-link:before { - content: ""; -} - -.ion-sad:before { - content: ""; -} - -.ion-social-chrome:before { - content: ""; -} - -.ion-social-css3:before { - content: ""; -} - -.ion-social-github:before { - content: ""; -} - -.ion-social-html5:before { - content: ""; -} - -.ion-social-twitter:before { - content: ""; -} - -code[class*=language-] { - color: #000; - background: 0 0; - text-shadow: 0 1px #fff; - font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; - direction: ltr; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - -moz-tab-size: 4; - tab-size: 4; - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; -} - -code[class*=language-]::-moz-selection,code[class*=language-]::-moz-selection { - text-shadow: none; - background: #b3d4fc; -} - -code[class*=language-]::selection,code[class*=language-]::selection { - text-shadow: none; - background: #b3d4fc; -} - -@media print { - code[class*=language-] { - text-shadow: none; - } -} - -:not(pre)>code[class*=language-] { - background: #f5f2f0; -} - -:not(pre)>code[class*=language-] { - padding: .1em; - border-radius: .3em; - white-space: normal; -} - -.pad { - max-width: 1100px; - margin: 0 auto; - padding: 0 2em; -} - -.interface:after,.interface:before,.navbar:after,.navbar:before,.site-footer .social-links:after,.site-footer .social-links:before,.site-footer section:after,.site-footer section:before { - content: ""; - display: table; -} - -.interface:after,.navbar:after,.site-footer .social-links:after,.site-footer section:after { - clear: both; -} - -body { - background-color: #202B30; - line-height: 1.5; - font-size: 1em; - font-family: proxima-nova, "Helvetica Neue", Helvetica, Arial, sans-serif; - color: #031C2B; -} - -.navbar,.site-footer section { - max-width: 1070px; - margin: 0 5%; -} - -@media all and (min-width:1180px) { - .navbar, .site-footer section { - margin: 0 auto; - } -} - -.interface { - background-color: #fff; -} - -img { - width: 100%; - max-width: 100%; -} - -h1,h2,h3,h4 { - font-weight: 300; - line-height: 1.2; -} - -h1 a,h2 a,h3 a,h4 a { - color: inherit; - text-decoration: none; -} - -h1 a:hover,h2 a:hover,h3 a:hover,h4 a:hover { - color: #2796D8; -} - -h1 { - font-size: 2.3em; -} - -h2 { - font-size: 2em; -} - -h3 { - font-size: 1.5em; -} - -h6 { - text-transform: uppercase; - font-size: .75em; -} - -a { - color: #1577C1; -} - -a:hover { - color: #FF6A39; -} - -.navbar-container { - border-top: 10px solid #FF6A39; -} - -.navbar-container:before { - content: ''; - position: absolute; - background-color: #F45B29; - width: 33.33%; - height: 10px; - top: 0; -} - -.navbar { - padding: 1em 0; - box-sizing: border-box; - min-height: 60px; -} - -.navbar .brand { - width: 60%; - float: left; - margin-top: 3px; -} - -.navbar .brand img { - width: 100px; -} - -@media all and (min-width:980px) { - .navbar { - padding: 2.5em 0 2em; - } - - .navbar .brand { - width: 15%; - margin-top: 0; - } - - .navbar .brand img { - width: 150px; - } -} - -.status-page .interface { - height: 90%; -} - -.status-page-panel { - margin: 0 auto; - width: 80%; - max-width: 500px; - text-align: center; - position: relative; - top: 30%; - -webkit-transform: translateY(-50%); - transform: translateY(-50%); -} - -.status-page-panel .status-page-brand { - margin: 2em 0; -} - -.status-page-panel .status-page-brand img { - width: 150px; -} - -.status-page-panel img { - width: 80px; -} - -.status-page-panel h1 { - margin: 0; -} - -.status-page-panel p { - margin: .5em 0 0; -} - -.site-footer { - font-size: .875em; - border-top: 4px solid #FF6A39; - color: #70858F; -} - -.site-footer .footer-section { - background-color: #1D2529; -} - -.site-footer a { - color: #fff; - text-decoration: none; -} - -.site-footer section { - padding: 2em 0; -} - -.site-footer section.extra-pad { - padding: 3em 0; -} - -.site-footer .brand { - width: 100px; -} - -.site-footer .social-links { - margin-top: 1em; -} - -.site-footer .social-links i { - display: inline-block; - margin-right: 5px; -} - -.site-footer .social-links a { - display: inline-block; - margin-top: 1em; - margin-right: 20px; -} - -@media all and (min-width:787px) { - .site-footer .brand { - width: 10%; - float: left; - } - - .site-footer .social-links { - width: 80%; - float: right; - margin-top: 0; - text-align: right; - } - - .site-footer .social-links a { - margin-top: 0; - margin-left: 20px; - margin-right: 0; - } -} \ No newline at end of file diff --git a/errors/twitter.svg b/errors/twitter.svg new file mode 100644 index 00000000..30c7c9f3 --- /dev/null +++ b/errors/twitter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/index.php b/src/index.php index 2c6ebd25..9f016e1f 100644 --- a/src/index.php +++ b/src/index.php @@ -1,3 +1,5 @@ From 5f0aad94381707ff07d6913dd3c04713f923afdb Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Thu, 5 Jul 2018 14:36:38 +0100 Subject: [PATCH 40/90] adding merge request !242 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c16266c3..70d1c4cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -271,5 +271,5 @@ ADD errors/ /var/www/errors EXPOSE 443 80 -WORKDIR ["/"] +WORKDIR ["/var/www/html"] CMD ["/start.sh"] From fe9e912fbddb6ab3d2eb11bba3ab73027d9da6d6 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Thu, 5 Jul 2018 14:38:20 +0100 Subject: [PATCH 41/90] fixes !244 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 70d1c4cd..b53c537c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -271,5 +271,5 @@ ADD errors/ /var/www/errors EXPOSE 443 80 -WORKDIR ["/var/www/html"] +WORKDIR "/var/www/html" CMD ["/start.sh"] From 687a6a812cbcb81882f3612de624c56501dd6ed4 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Fri, 27 Jul 2018 09:33:04 -0700 Subject: [PATCH 42/90] bumping php to 7.2.8 --- Dockerfile | 2 +- README.md | 4 ++-- docs/versioning.md | 19 ++++++++++--------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index b53c537c..c1c30713 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.2.7-fpm-alpine +FROM php:7.2.8-fpm-alpine LABEL maintainer="Ric Harvey " diff --git a/README.md b/README.md index 4acf179c..86d2d7e8 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest | Master Branch |1.14.0 | 7.2.7 | 3.7 | -| 1.5.4 | 7.2 Branch |1.14.0 | 7.2.7 | 3.7 | +| latest | Master Branch |1.14.0 | 7.2.8 | 3.7 | +| 1.5.5 | 7.2 Branch |1.14.0 | 7.2.8 | 3.7 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index bf82a29d..e95cfc71 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -15,15 +15,16 @@ The latest tag will always follow the master branch in git. the other versions w #### PHP 7.2 -| Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | Container Scripts | -|-----|-------|-----|--------|--------|--------| -| 1.4.0 | 7.2.0 |1.13.2 | 7.2.0 | 3.6 | 0.3.5 | -| 1.4.1 | 7.2.0 |1.13.2 | 7.2.0 | 3.6 | 0.3.6 | -| 1.5.0 | 7.2.4 |1.14.0 | 7.2.4 | 3.6 | 0.3.6 | -| 1.5.1 | 7.2.6 |1.14.0 | 7.2.4 | 3.7 | 0.3.6 | -| 1.5.2 | 7.2.6 |1.14.0 | 7.2.4 | 3.7 | 0.3.7 | -| 1.5.3 | 7.2.7 |1.14.0 | 7.2.4 | 3.7 | 0.3.7 | -| 1.5.4 | 7.2.7 |1.14.0 | 7.2.4 | 3.7 | 0.3.8 | +| Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | +|-----|-------|-----|--------|--------| +| 1.4.0 | 7.2.0 |1.13.2 | 3.6 | 0.3.5 | +| 1.4.1 | 7.2.0 |1.13.2 | 3.6 | 0.3.6 | +| 1.5.0 | 7.2.4 |1.14.0 | 3.6 | 0.3.6 | +| 1.5.1 | 7.2.6 |1.14.0 | 3.7 | 0.3.6 | +| 1.5.2 | 7.2.6 |1.14.0 | 3.7 | 0.3.7 | +| 1.5.3 | 7.2.7 |1.14.0 | 3.7 | 0.3.7 | +| 1.5.4 | 7.2.7 |1.14.0 | 3.7 | 0.3.8 | +| 1.5.5 | 7.2.7 |1.14.0 | 3.7 | 0.3.8 | These tags will be created on GitLab and as tags in docker hub. From 52da3511e8b94c9a1936a4ca1262f233c7f448b7 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Thu, 27 Sep 2018 13:25:38 +0100 Subject: [PATCH 43/90] Update release for PHP 7.2.10 --- Dockerfile | 2 +- README.md | 3 +-- docs/versioning.md | 4 +++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index c1c30713..88ce9d9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.2.8-fpm-alpine +FROM php:7.2.10-fpm-alpine LABEL maintainer="Ric Harvey " diff --git a/README.md b/README.md index 86d2d7e8..a09d64aa 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest | Master Branch |1.14.0 | 7.2.8 | 3.7 | -| 1.5.5 | 7.2 Branch |1.14.0 | 7.2.8 | 3.7 | +| latest/1.5.7 | Master Branch |1.14.0 | 7.2.10 | 3.7 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index e95cfc71..a8c26ae5 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -24,7 +24,9 @@ The latest tag will always follow the master branch in git. the other versions w | 1.5.2 | 7.2.6 |1.14.0 | 3.7 | 0.3.7 | | 1.5.3 | 7.2.7 |1.14.0 | 3.7 | 0.3.7 | | 1.5.4 | 7.2.7 |1.14.0 | 3.7 | 0.3.8 | -| 1.5.5 | 7.2.7 |1.14.0 | 3.7 | 0.3.8 | +| 1.5.5 | 7.2.8 |1.14.0 | 3.7 | 0.3.8 | +| 1.5.6 | 7.2.9 |1.14.0 | 3.7 | 0.3.8 | +| 1.5.7 | 7.2.10 |1.14.0 | 3.7 | 0.3.8 | These tags will be created on GitLab and as tags in docker hub. From f2cc4b6f19959d453570c1e7a84c0e0c2984670f Mon Sep 17 00:00:00 2001 From: Roberto Bermejo Martinez Date: Fri, 28 Sep 2018 21:11:22 +0200 Subject: [PATCH 44/90] Allow user to change config and scripts folder --- docs/config_flags.md | 2 ++ docs/nginx_configs.md | 1 + docs/scripting_templating.md | 1 + scripts/letsencrypt-setup | 4 --- scripts/pull | 8 +++--- scripts/push | 2 +- scripts/start.sh | 47 +++++++++++++++++++++--------------- 7 files changed, 37 insertions(+), 28 deletions(-) diff --git a/docs/config_flags.md b/docs/config_flags.md index c1b8a6bf..b9cd31a4 100644 --- a/docs/config_flags.md +++ b/docs/config_flags.md @@ -21,6 +21,7 @@ The following flags are a list of all the currently supported options that can b | Name | Description | |-------------------------|----------------------------------------------------------------------------------------------------------------| | WEBROOT | Change the default webroot directory from `/var/www/html` to your own setting | +| CONFIG_FOLDER | Change the default config directory from `/var/www/html/conf` to your own setting | | ERRORS | Set to 1 to display PHP Errors in the browser | | HIDE_NGINX_HEADERS | Disable by setting to 0, default behaviour is to hide nginx + php version in headers | | PHP_MEM_LIMIT | Set higher PHP memory limit, default is 128 Mb | @@ -31,6 +32,7 @@ The following flags are a list of all the currently supported options that can b | REAL_IP_HEADER | set to 1 to enable real ip support in the logs | | REAL_IP_FROM | set to your CIDR block for real ip in logs | | RUN_SCRIPTS | Set to 1 to execute scripts | +| SCRIPTS_FOLDER | Change the default script folder from `/var/www/html/scripts` to your won setting | | PGID | Set to GroupId you want to use for nginx (helps permissions when using local volume) | | PUID | Set to UserID you want to use for nginx (helps permissions when using local volume) | | REMOVE_FILES | Use REMOVE_FILES=0 to prevent the script from clearing out /var/www/html (useful for working with local files) | diff --git a/docs/nginx_configs.md b/docs/nginx_configs.md index 436a798f..5e18f82a 100644 --- a/docs/nginx_configs.md +++ b/docs/nginx_configs.md @@ -1,5 +1,6 @@ ## Custom Nginx Config files Sometimes you need a custom config file for nginx to do rewrites or password protection, etc. For this reason we've included the ability to have custom nginx configs pulled directly from your git source. Please have a read of the [repo layout guidelines](repo_layout.md) for more information. Its pretty simple to enable this, all you need to do is include a folder in the root of your repository called ```conf/nginx/``` within this folder you need to include a file called ```nginx-site.conf``` which will contain your default nginx site config. If you wish to have a custom file for SSL you simply include a file called ```nginx-site-ssl.conf``` in the same directory. These files will then be swapped in after you code is cloned. +In addition, you can configure __CONFIG_FOLDER__ with your custome path. ## REAL IP / X-Forwarded-For Headers If you operate your container behind a load balancer, an ELB on AWS for example, you need to configure nginx to get the real IP and not the load balancer IP in the logs by using the X-Forwarded-For. We've provided some handy flags to let you do this. You need to set both of these to get this to work: diff --git a/docs/scripting_templating.md b/docs/scripting_templating.md index 02ab7153..30693a83 100644 --- a/docs/scripting_templating.md +++ b/docs/scripting_templating.md @@ -1,5 +1,6 @@ ## Scripting There is often an occasion where you need to run a script on code to do a transformation once code lands in the container. For this reason we have developed scripting support. By including a scripts folder in your git repository and passing the __RUN_SCRIPTS=1__ flag to your command line the container will execute your scripts. Please see the [repo layout guidelines](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/repo_layout.md) for more details on how to organise this. +In addition, you can configure __SCRIPT_FOLDER__ with your custome path. ## Using environment variables / templating To set the variables pass them in as environment variables on the docker command line. diff --git a/scripts/letsencrypt-setup b/scripts/letsencrypt-setup index 45f560be..0a4f9f87 100755 --- a/scripts/letsencrypt-setup +++ b/scripts/letsencrypt-setup @@ -10,10 +10,6 @@ else # change nginx for webroot and domain name sed -i "s/##DOMAIN##/${DOMAIN}/g" /etc/nginx/sites-enabled/default-ssl.conf sed -i "s#root /var/www/html;#root ${WEBROOT};#g" /etc/nginx/sites-available/default-ssl.conf - if [ ! -z "$WEBROOT" ]; then - webroot=$WEBROOT - sed -i "s#root /var/www/html;#root ${webroot};#g" /etc/nginx/sites-available/default-ssl.conf - fi supervisorctl restart nginx diff --git a/scripts/pull b/scripts/pull index 2231550b..8ec30458 100755 --- a/scripts/pull +++ b/scripts/pull @@ -11,10 +11,10 @@ if [ -z "$GIT_NAME" ]; then fi # Try auto install for composer -if [ -f "/var/www/html/composer.lock" ]; then - composer install --no-dev --working-dir=/var/www/html +if [ -f "${WEBROOT}/composer.lock" ]; then + composer install --no-dev --working-dir=${WEBROOT} fi -cd /var/www/html +cd ${WEBROOT} git pull || exit 1 -chown -Rf nginx:nginx /var/www/html +chown -Rf nginx:nginx ${WEBROOT} diff --git a/scripts/push b/scripts/push index bf577cfa..ff89d393 100755 --- a/scripts/push +++ b/scripts/push @@ -15,7 +15,7 @@ if [ -z "$GIT_NAME" ]; then fi ts=$(timestamp) -cd /var/www/html +cd ${WEBROOT} git add . git commit -a -m "push from container $ts" git push diff --git a/scripts/start.sh b/scripts/start.sh index 61c7e2db..d709b7f3 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -21,7 +21,7 @@ fi if [ ! -z "$WEBROOT" ]; then sed -i "s#root /var/www/html;#root ${WEBROOT};#g" /etc/nginx/sites-available/default.conf else - webroot=/var/www/html + WEBROOT=/var/www/html fi # Setup git variables @@ -34,14 +34,14 @@ if [ ! -z "$GIT_NAME" ]; then fi # Dont pull code down if the .git folder exists -if [ ! -d "/var/www/html/.git" ]; then +if [ ! -d "${WEBROOT}/.git" ]; then # Pull down code from git for our site! if [ ! -z "$GIT_REPO" ]; then # Remove the test index file if you are pulling in a git repo if [ ! -z ${REMOVE_FILES} ] && [ ${REMOVE_FILES} == 0 ]; then echo "skiping removal of files" else - rm -Rf /var/www/html/* + rm -Rf ${WEBROOT}/* fi GIT_COMMAND='git clone ' if [ ! -z "$GIT_BRANCH" ]; then @@ -57,7 +57,7 @@ if [ ! -d "/var/www/html/.git" ]; then GIT_COMMAND=${GIT_COMMAND}" https://${GIT_USERNAME}:${GIT_PERSONAL_TOKEN}@${GIT_REPO}" fi fi - ${GIT_COMMAND} /var/www/html || exit 1 + ${GIT_COMMAND} ${WEBROOT} || exit 1 if [ ! -z "$GIT_TAG" ]; then git checkout ${GIT_TAG} || exit 1 fi @@ -65,22 +65,26 @@ if [ ! -d "/var/www/html/.git" ]; then git checkout ${GIT_COMMIT} || exit 1 fi if [ -z "$SKIP_CHOWN" ]; then - chown -Rf nginx.nginx /var/www/html + chown -Rf nginx.nginx ${WEBROOT} fi fi fi +if [ -z "$CONFIG_FOLDER" ]; then + CONFIG_FOLDER=${WEBROOT}/conf +fi + # Enable custom nginx config files if they exist -if [ -f /var/www/html/conf/nginx/nginx.conf ]; then - cp /var/www/html/conf/nginx/nginx.conf /etc/nginx/nginx.conf +if [ -f ${CONFIG_FOLDER}/nginx.conf ]; then + cp ${CONFIG_FOLDER}/nginx.conf /etc/nginx/nginx.conf fi -if [ -f /var/www/html/conf/nginx/nginx-site.conf ]; then - cp /var/www/html/conf/nginx/nginx-site.conf /etc/nginx/sites-available/default.conf +if [ -f ${CONFIG_FOLDER}/nginx-site.conf ]; then + cp ${CONFIG_FOLDER}/nginx-site.conf /etc/nginx/sites-available/default.conf fi -if [ -f /var/www/html/conf/nginx/nginx-site-ssl.conf ]; then - cp /var/www/html/conf/nginx/nginx-site-ssl.conf /etc/nginx/sites-available/default-ssl.conf +if [ -f ${CONFIG_FOLDER}/nginx-site-ssl.conf ]; then + cp ${CONFIG_FOLDER}/nginx-site-ssl.conf /etc/nginx/sites-available/default-ssl.conf fi @@ -169,7 +173,7 @@ if [[ "$ENABLE_XDEBUG" == "1" ]] ; then fi fi fi -else +else if [ -f $XdebugFile ]; then echo "Disabling Xdebug" rm $XdebugFile @@ -185,17 +189,22 @@ if [ ! -z "$PUID" ]; then adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx -u ${PUID} nginx else if [ -z "$SKIP_CHOWN" ]; then - chown -Rf nginx.nginx /var/www/html + chown -Rf nginx.nginx ${WEBROOT} fi fi # Run custom scripts if [[ "$RUN_SCRIPTS" == "1" ]] ; then - if [ -d "/var/www/html/scripts/" ]; then + + if [ -z "$SCRIPTS_FOLDER" ]; then + SCRIPTS_FOLDER=${WEBROOT}/scripts/ + fi + + if [ -d "${SCRIPTS_FOLDER}" ]; then # make scripts executable incase they aren't - chmod -Rf 750 /var/www/html/scripts/*; sync; + chmod -Rf 750 ${SCRIPTS_FOLDER}/*; sync; # run scripts in number order - for i in `ls /var/www/html/scripts/`; do /var/www/html/scripts/$i ; done + for i in `ls ${SCRIPTS_FOLDER}/`; do ${SCRIPTS_FOLDER}/$i ; done else echo "Can't find script directory" fi @@ -203,13 +212,13 @@ fi if [ -z "$SKIP_COMPOSER" ]; then # Try auto install for composer - if [ -f "/var/www/html/composer.lock" ]; then + if [ -f "${WEBROOT}/composer.lock" ]; then if [ "$APPLICATION_ENV" == "development" ]; then composer global require hirak/prestissimo - composer install --working-dir=/var/www/html + composer install --working-dir=${WEBROOT} else composer global require hirak/prestissimo - composer install --no-dev --working-dir=/var/www/html + composer install --no-dev --working-dir=${WEBROOT} fi fi fi From cb73d5c8ca3366517959ba24bfb362ef57cbc2fd Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Sat, 13 Oct 2018 23:25:19 +0000 Subject: [PATCH 45/90] Fix syntax error in example-service.yml --- docs/guides/kubernetes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/kubernetes.md b/docs/guides/kubernetes.md index 499cfc58..122b61b4 100644 --- a/docs/guides/kubernetes.md +++ b/docs/guides/kubernetes.md @@ -81,7 +81,7 @@ kind: Service metadata: namespace: example name: example-app - spec: +spec: type: ClusterIP ports: - protocol: TCP From 4e9c645fa6810ee69c6ffbc65bc26476af5a2ef8 Mon Sep 17 00:00:00 2001 From: Aaron C Date: Thu, 20 Dec 2018 16:46:43 +0100 Subject: [PATCH 46/90] Add list of installed php modules This is information I would have wanted before I started using this image. --- docs/php_modules.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/php_modules.md b/docs/php_modules.md index 843d6b69..976ac082 100644 --- a/docs/php_modules.md +++ b/docs/php_modules.md @@ -14,3 +14,21 @@ supervisorctl restart php-fpm ``` We may include a env var to do this in the future. + +## Extensions already installed +The following are already installed and ready to use: + +| `docker-php-ext-`name | Description +|----|----| +| curl | cURL: command line tool and library for transferring data with URLs +| dom | **DOM**-manipulation library +| gd | **GD**: Image creation and manipulation library +| intl | **Internationalization** (i18n) function library +| mysqli | **MySQL Improved**: Procedural-style library for connecting to and using a MySQL database +| opcache | **OPcache**: Improves PHP performace by storing precompiled script bytecode in shared memory +| pdo | **PDO**: PHP Database Object; Object-oriented library for connecting to various databases. +| pdo_mysql | **MySQL Driver** for PDO +| pdo_sqlite | **SQLite Driver** for PDO +| soap | **SOAP**: **S**imple **O**bject **A**ccess **P**rotocol library +| xsl | **XSL**: e**X**stensible **S**tyling **L**anguage library +| zip | **ZIP**: Transparently read and write ZIP compressed archives From 90748a8c1a1b8c1f8c5afaa8bbc0a757a3f71240 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 5 Mar 2019 21:12:32 +0000 Subject: [PATCH 47/90] bumping nginx to 1.14.2 and php to 7.3.2 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 88ce9d9e..b59a7423 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.2.10-fpm-alpine +FROM php:7.3.2-fpm-alpine LABEL maintainer="Ric Harvey " @@ -6,7 +6,7 @@ ENV php_conf /usr/local/etc/php-fpm.conf ENV fpm_conf /usr/local/etc/php-fpm.d/www.conf ENV php_vars /usr/local/etc/php/conf.d/docker-vars.ini -ENV NGINX_VERSION 1.14.0 +ENV NGINX_VERSION 1.14.2 ENV LUA_MODULE_VERSION 0.10.13 ENV DEVEL_KIT_MODULE_VERSION 0.3.0 ENV LUAJIT_LIB=/usr/lib From 1658c95859a31e8f1dba3ed96a4ae50602cf1544 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 5 Mar 2019 21:14:41 +0000 Subject: [PATCH 48/90] update version in docs --- README.md | 2 +- docs/versioning.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a09d64aa..5e20095b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.5.7 | Master Branch |1.14.0 | 7.2.10 | 3.7 | +| latest/1.6.0 | Master Branch |1.14.2 | 7.3.2 | 3.7 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index a8c26ae5..76465bc1 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -13,6 +13,12 @@ We will use the [semver](http://ricostacruz.com/cheatsheets/semver.html) style n The latest tag will always follow the master branch in git. the other versions will have releases attached. +#### PHP 7.3 + +| Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | +|-----|-------|-----|--------|--------| +| 1.6.0 | 7.3.2 |1.14.2 | 3.7 | 0.3.8 | + #### PHP 7.2 | Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | From f2d2779d13ee43a8305b2657fea2b9f061ab7ef6 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 5 Mar 2019 21:31:21 +0000 Subject: [PATCH 49/90] adding libzip-dev --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b59a7423..c66eb32e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ ENV fpm_conf /usr/local/etc/php-fpm.d/www.conf ENV php_vars /usr/local/etc/php/conf.d/docker-vars.ini ENV NGINX_VERSION 1.14.2 -ENV LUA_MODULE_VERSION 0.10.13 +ENV LUA_MODULE_VERSION 0.10.14 ENV DEVEL_KIT_MODULE_VERSION 0.3.0 ENV LUAJIT_LIB=/usr/lib ENV LUAJIT_INC=/usr/include/luajit-2.1 @@ -167,6 +167,7 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo supervisor \ curl \ libcurl \ + libzip-dev \ git \ python \ python-dev \ From de6a2f6dd4b988750f45efc6972e3d877af84174 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 5 Mar 2019 21:56:47 +0000 Subject: [PATCH 50/90] fix xdebug and composer install --- Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index c66eb32e..029f0d76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -198,17 +198,15 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo #curl iconv session #docker-php-ext-install pdo_mysql pdo_sqlite mysqli mcrypt gd exif intl xsl json soap dom zip opcache && \ docker-php-ext-install iconv pdo_mysql pdo_sqlite mysqli gd exif intl xsl json soap dom zip opcache && \ - pecl install xdebug-2.6.0 && \ + pecl install xdebug-2.7.0RC1 && \ docker-php-source delete && \ mkdir -p /etc/nginx && \ mkdir -p /var/www/app && \ mkdir -p /run/nginx && \ mkdir -p /var/log/supervisor && \ - EXPECTED_COMPOSER_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig) && \ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ - php -r "if (hash_file('SHA384', 'composer-setup.php') === '${EXPECTED_COMPOSER_SIGNATURE}') { echo 'Composer.phar Installer verified'; } else { echo 'Composer.phar Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ - php composer-setup.php --install-dir=/usr/bin --filename=composer && \ - php -r "unlink('composer-setup.php');" && \ + php composer-setup.php --quiet --install-dir=/usr/bin --filename=composer && \ + rm composer-setup.php && \ pip install -U pip && \ pip install -U certbot && \ mkdir -p /etc/letsencrypt/webrootauth && \ From a645caa44ed0a2e8570e910a8c3c00ecdbbfde55 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Wed, 6 Mar 2019 11:43:58 +0000 Subject: [PATCH 51/90] Pushing version locked to alpine 3.9 --- Dockerfile | 2 +- README.md | 2 +- docs/versioning.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 029f0d76..83392c86 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3.2-fpm-alpine +FROM php:7.3.2-fpm-alpine3.9 LABEL maintainer="Ric Harvey " diff --git a/README.md b/README.md index 5e20095b..e95b9e98 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.6.0 | Master Branch |1.14.2 | 7.3.2 | 3.7 | +| latest/1.6.0 | Master Branch |1.14.2 | 7.3.2 | 3.9 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 76465bc1..9f289828 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -17,7 +17,7 @@ The latest tag will always follow the master branch in git. the other versions w | Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | |-----|-------|-----|--------|--------| -| 1.6.0 | 7.3.2 |1.14.2 | 3.7 | 0.3.8 | +| 1.6.0 | 7.3.2 |1.14.2 | 3.9 | 0.3.8 | #### PHP 7.2 From 0c439c32f90e6ed7b31af15736870e02cf2935b5 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Wed, 6 Mar 2019 11:55:24 +0000 Subject: [PATCH 52/90] Fix git directory access closes #251 --- conf/nginx-site-ssl.conf | 6 ++++++ conf/nginx-site.conf | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/conf/nginx-site-ssl.conf b/conf/nginx-site-ssl.conf index 1bdf6e81..b0224455 100644 --- a/conf/nginx-site-ssl.conf +++ b/conf/nginx-site-ssl.conf @@ -26,6 +26,12 @@ server { #real_ip_header X-Forwarded-For; #set_real_ip_from 172.16.0.0/12; + # block access to sensitive information about git + location /.git { + deny all; + return 403; + } + location / { # First attempt to serve request as file, then # as directory, then fall back to index.html diff --git a/conf/nginx-site.conf b/conf/nginx-site.conf index 4d9c6a6e..3c38946e 100644 --- a/conf/nginx-site.conf +++ b/conf/nginx-site.conf @@ -19,6 +19,12 @@ server { #real_ip_header X-Forwarded-For; #set_real_ip_from 172.16.0.0/12; + # block access to sensitive information about git + location /.git { + deny all; + return 403; + } + location / { # First attempt to serve request as file, then # as directory, then fall back to index.html From 97f859fdd84c02f5d4dc2e99253b45c3b9634300 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Thu, 7 Mar 2019 14:29:21 +0000 Subject: [PATCH 53/90] update incorrect version of php in docs --- docs/versioning.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versioning.md b/docs/versioning.md index 9f289828..021cd561 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -30,7 +30,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.5.2 | 7.2.6 |1.14.0 | 3.7 | 0.3.7 | | 1.5.3 | 7.2.7 |1.14.0 | 3.7 | 0.3.7 | | 1.5.4 | 7.2.7 |1.14.0 | 3.7 | 0.3.8 | -| 1.5.5 | 7.2.8 |1.14.0 | 3.7 | 0.3.8 | +| 1.5.5 | 7.2.10 |1.14.0 | 3.7 | 0.3.8 | | 1.5.6 | 7.2.9 |1.14.0 | 3.7 | 0.3.8 | | 1.5.7 | 7.2.10 |1.14.0 | 3.7 | 0.3.8 | From e9027cc44d9483a3907efd9ba6e52be5b4f18a51 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Fri, 8 Mar 2019 19:35:26 +0000 Subject: [PATCH 54/90] gnu-libiconv moved to community repo fixes build and closes #258 --- Dockerfile | 2 +- README.md | 2 +- docs/versioning.md | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 83392c86..b815eab9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ ENV LUAJIT_INC=/usr/include/luajit-2.1 # resolves #166 ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php -RUN apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing gnu-libiconv +RUN apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community gnu-libiconv RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ && CONFIG="\ diff --git a/README.md b/README.md index e95b9e98..791dba5c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.6.0 | Master Branch |1.14.2 | 7.3.2 | 3.9 | +| latest/1.6.1 | Master Branch |1.14.2 | 7.3.2 | 3.9 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 021cd561..38a2545d 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -18,6 +18,7 @@ The latest tag will always follow the master branch in git. the other versions w | Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | |-----|-------|-----|--------|--------| | 1.6.0 | 7.3.2 |1.14.2 | 3.9 | 0.3.8 | +| 1.6.1 | 7.3.2 |1.14.2 | 3.9 | 0.3.8 | #### PHP 7.2 From cf4cca29f4518fc88cf015684f35c3ab8de25ed8 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Fri, 8 Mar 2019 19:40:35 +0000 Subject: [PATCH 55/90] fix docs [skip ci] --- README.md | 2 +- docs/versioning.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 791dba5c..0336699c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.6.1 | Master Branch |1.14.2 | 7.3.2 | 3.9 | +| latest/1.6.2 | Master Branch |1.14.2 | 7.3.2 | 3.9 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 38a2545d..00c7a751 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -18,7 +18,8 @@ The latest tag will always follow the master branch in git. the other versions w | Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | |-----|-------|-----|--------|--------| | 1.6.0 | 7.3.2 |1.14.2 | 3.9 | 0.3.8 | -| 1.6.1 | 7.3.2 |1.14.2 | 3.9 | 0.3.8 | +| 1.6.1 | 7.3.2 |1.14.2 | 3.9 | 0.3.9 | +| 1.6.2 | 7.3.2 |1.14.2 | 3.9 | 0.3.10 | #### PHP 7.2 From d99fb28cd7f86535110347cb2e3bde06e0fdca40 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Fri, 8 Mar 2019 19:57:56 +0000 Subject: [PATCH 56/90] Bump to PHP 7.3.3 --- Dockerfile | 2 +- README.md | 2 +- docs/versioning.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index b815eab9..c0cf0694 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3.2-fpm-alpine3.9 +FROM php:7.3.3-fpm-alpine3.9 LABEL maintainer="Ric Harvey " diff --git a/README.md b/README.md index 0336699c..1d97b63e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.6.2 | Master Branch |1.14.2 | 7.3.2 | 3.9 | +| latest/1.6.2 | Master Branch |1.14.2 | 7.3.3 | 3.9 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 00c7a751..777ab109 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -19,7 +19,7 @@ The latest tag will always follow the master branch in git. the other versions w |-----|-------|-----|--------|--------| | 1.6.0 | 7.3.2 |1.14.2 | 3.9 | 0.3.8 | | 1.6.1 | 7.3.2 |1.14.2 | 3.9 | 0.3.9 | -| 1.6.2 | 7.3.2 |1.14.2 | 3.9 | 0.3.10 | +| 1.6.2 | 7.3.3 |1.14.2 | 3.9 | 0.3.10 | #### PHP 7.2 From 53d37e1b7c5f3f0742d61ef91d57a44c201ad55c Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sat, 9 Mar 2019 22:30:25 +0000 Subject: [PATCH 57/90] closes #240 closes !250 --- README.md | 2 +- docs/versioning.md | 1 + scripts/start.sh | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1d97b63e..60c065d8 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.6.2 | Master Branch |1.14.2 | 7.3.3 | 3.9 | +| latest/1.6.3 | Master Branch |1.14.2 | 7.3.3 | 3.9 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 777ab109..8c071ae2 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -20,6 +20,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.6.0 | 7.3.2 |1.14.2 | 3.9 | 0.3.8 | | 1.6.1 | 7.3.2 |1.14.2 | 3.9 | 0.3.9 | | 1.6.2 | 7.3.3 |1.14.2 | 3.9 | 0.3.10 | +| 1.6.3 | 7.3.3 |1.14.2 | 3.9 | 0.3.11 | #### PHP 7.2 diff --git a/scripts/start.sh b/scripts/start.sh index 61c7e2db..b45f7ead 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -92,9 +92,9 @@ fi # Display PHP error's or not if [[ "$ERRORS" != "1" ]] ; then - echo php_flag[display_errors] = off >> /usr/local/etc/php-fpm.conf + echo php_flag[display_errors] = off >> /usr/local/etc/php-fpm.d/www.conf else - echo php_flag[display_errors] = on >> /usr/local/etc/php-fpm.conf + echo php_flag[display_errors] = on >> /usr/local/etc/php-fpm.d/www.conf fi # Display Version Details or not @@ -123,7 +123,10 @@ if [ -f /etc/nginx/sites-available/default-ssl.conf ]; then fi fi -#Display errors in docker logs +# Set the desired timezone +echo date.timezone=$(cat /etc/TZ) > /usr/local/etc/php/conf.d/timezone.ini + +# Display errors in docker logs if [ ! -z "$PHP_ERRORS_STDERR" ]; then echo "log_errors = On" >> /usr/local/etc/php/conf.d/docker-vars.ini echo "error_log = /dev/stderr" >> /usr/local/etc/php/conf.d/docker-vars.ini From 1e8f7e821269f4b66ad5c0fedd2326b7cd2c4e0d Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sat, 9 Mar 2019 22:39:45 +0000 Subject: [PATCH 58/90] Fix xdebug always running --- scripts/start.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/start.sh b/scripts/start.sh index b45f7ead..04e789bd 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -165,6 +165,7 @@ if [[ "$ENABLE_XDEBUG" == "1" ]] ; then else echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > $XdebugFile # Note, single arrow to overwrite file. echo "xdebug.remote_enable=1 " >> $XdebugFile + echo "remote_host=host.docker.internal" >> $XdebugFile echo "xdebug.remote_log=/tmp/xdebug.log" >> $XdebugFile echo "xdebug.remote_autostart=false " >> $XdebugFile # I use the xdebug chrome extension instead of using autostart # NOTE: xdebug.remote_host is not needed here if you set an environment variable in docker-compose like so `- XDEBUG_CONFIG=remote_host=192.168.111.27`. From 011a7d0a478b7f4f7d5047228a399613ce71a151 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sat, 9 Mar 2019 22:45:55 +0000 Subject: [PATCH 59/90] closes #212 adds option to install bz2 module --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index c0cf0694..666fab37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -75,6 +75,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ libressl-dev \ pcre-dev \ zlib-dev \ + bzip2-dev \ linux-headers \ curl \ gnupg \ From a8bd5c9c90c0f5a5349e42e9bcd948dc451bd207 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sat, 9 Mar 2019 22:54:20 +0000 Subject: [PATCH 60/90] closes #249 --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 666fab37..68e014e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -76,6 +76,8 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ pcre-dev \ zlib-dev \ bzip2-dev \ + imap-dev \ + openssl-dev \ linux-headers \ curl \ gnupg \ From 3eef2aca5269ec3e5f61d80b9454616197462626 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sat, 9 Mar 2019 23:58:32 +0000 Subject: [PATCH 61/90] fix libs for some extensions --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 68e014e3..e0e0da7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -75,9 +75,6 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ libressl-dev \ pcre-dev \ zlib-dev \ - bzip2-dev \ - imap-dev \ - openssl-dev \ linux-headers \ curl \ gnupg \ @@ -171,6 +168,9 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo curl \ libcurl \ libzip-dev \ + bzip2-dev \ + imap-dev \ + openssl-dev \ git \ python \ python-dev \ From 5448e35d2c878eed7ff64fef8f615a4ac0bb966c Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sun, 10 Mar 2019 00:35:01 +0000 Subject: [PATCH 62/90] update docs --- README.md | 2 +- docs/versioning.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 60c065d8..5db20c31 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.6.3 | Master Branch |1.14.2 | 7.3.3 | 3.9 | +| latest/1.6.4 | Master Branch |1.14.2 | 7.3.3 | 3.9 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 8c071ae2..e7d49fdb 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -21,6 +21,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.6.1 | 7.3.2 |1.14.2 | 3.9 | 0.3.9 | | 1.6.2 | 7.3.3 |1.14.2 | 3.9 | 0.3.10 | | 1.6.3 | 7.3.3 |1.14.2 | 3.9 | 0.3.11 | +| 1.6.4 | 7.3.3 |1.14.2 | 3.9 | 0.3.12 | #### PHP 7.2 From d4a77f92758aa565bb463bbbecd1be7361b3a734 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sun, 10 Mar 2019 15:26:07 +0000 Subject: [PATCH 63/90] add pgsql support closes #186 --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e0e0da7e..7e1a5ed7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -192,7 +192,8 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo libffi-dev \ freetype-dev \ sqlite-dev \ - libjpeg-turbo-dev && \ + libjpeg-turbo-dev \ + postgresql-dev && \ docker-php-ext-configure gd \ --with-gd \ --with-freetype-dir=/usr/include/ \ @@ -200,7 +201,7 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo --with-jpeg-dir=/usr/include/ && \ #curl iconv session #docker-php-ext-install pdo_mysql pdo_sqlite mysqli mcrypt gd exif intl xsl json soap dom zip opcache && \ - docker-php-ext-install iconv pdo_mysql pdo_sqlite mysqli gd exif intl xsl json soap dom zip opcache && \ + docker-php-ext-install iconv pdo_mysql pdo_sqlite pgsql pdo_pgsql mysqli gd exif intl xsl json soap dom zip opcache && \ pecl install xdebug-2.7.0RC1 && \ docker-php-source delete && \ mkdir -p /etc/nginx && \ From 1100d19b312e4d0a299c61e60e343990f9c5dcee Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Thu, 14 Mar 2019 20:48:04 +0000 Subject: [PATCH 64/90] adding redis extention --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 7e1a5ed7..bf71843f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -203,6 +203,8 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo #docker-php-ext-install pdo_mysql pdo_sqlite mysqli mcrypt gd exif intl xsl json soap dom zip opcache && \ docker-php-ext-install iconv pdo_mysql pdo_sqlite pgsql pdo_pgsql mysqli gd exif intl xsl json soap dom zip opcache && \ pecl install xdebug-2.7.0RC1 && \ + pecl install -o -f redis && \ + echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini && \ docker-php-source delete && \ mkdir -p /etc/nginx && \ mkdir -p /var/www/app && \ From 2f5577cc2fc545d13850b234c0e5d1dadad2b6ac Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Thu, 14 Mar 2019 20:55:59 +0000 Subject: [PATCH 65/90] update versions --- README.md | 2 +- docs/versioning.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5db20c31..0be79f98 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.6.4 | Master Branch |1.14.2 | 7.3.3 | 3.9 | +| latest/1.6.6 | Master Branch |1.14.2 | 7.3.3 | 3.9 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index e7d49fdb..b09000ea 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -22,6 +22,8 @@ The latest tag will always follow the master branch in git. the other versions w | 1.6.2 | 7.3.3 |1.14.2 | 3.9 | 0.3.10 | | 1.6.3 | 7.3.3 |1.14.2 | 3.9 | 0.3.11 | | 1.6.4 | 7.3.3 |1.14.2 | 3.9 | 0.3.12 | +| 1.6.5 | 7.3.3 |1.14.2 | 3.9 | 0.3.12 | +| 1.6.6 | 7.3.3 |1.14.2 | 3.9 | 0.3.12 | #### PHP 7.2 From 021730a53b23248995d2b8901e8a50086ebb0171 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Thu, 14 Mar 2019 20:59:01 +0000 Subject: [PATCH 66/90] Line up icons in README [skip-ci] --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0be79f98..b0a41ee0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![pipeline status](https://gitlab.com/ric_harvey/nginx-php-fpm/badges/master/pipeline.svg)](https://gitlab.com/ric_harvey/nginx-php-fpm/commits/master) -![docker hub](https://img.shields.io/docker/pulls/richarvey/nginx-php-fpm.svg?style=flat-square) -![docker hub](https://img.shields.io/docker/stars/richarvey/nginx-php-fpm.svg?style=flat-square) +![docker hub](https://img.shields.io/docker/pulls/richarvey/nginx-php-fpm.svg?style=flat) +![docker hub](https://img.shields.io/docker/stars/richarvey/nginx-php-fpm.svg?style=flat) ## Overview This is a Dockerfile/image to build a container for nginx and php-fpm, with the ability to pull website code from git when the container is created, as well as allowing the container to push and pull changes to the code to and from git. The container also has the ability to update templated files with variables passed to docker in order to update your code and settings. There is support for lets encrypt SSL configurations, custom nginx configs, core nginx/PHP variable overrides for running preferences, X-Forwarded-For headers and UID mapping for local volume support. From a058553df43cbdcc0e03b4a9d49377164de7dbae Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Thu, 14 Mar 2019 21:45:15 +0000 Subject: [PATCH 67/90] line up badges --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b0a41ee0..294bcce7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![pipeline status](https://gitlab.com/ric_harvey/nginx-php-fpm/badges/master/pipeline.svg)](https://gitlab.com/ric_harvey/nginx-php-fpm/commits/master) +![pipeline status](https://gitlab.com/ric_harvey/nginx-php-fpm/badges/master/pipeline.svg)] ![docker hub](https://img.shields.io/docker/pulls/richarvey/nginx-php-fpm.svg?style=flat) ![docker hub](https://img.shields.io/docker/stars/richarvey/nginx-php-fpm.svg?style=flat) From 21cee8bd68b7129423be13ed4d51b86faa0aabc1 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Thu, 14 Mar 2019 22:05:32 +0000 Subject: [PATCH 68/90] fix syntax --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 294bcce7..66c4b7a0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![pipeline status](https://gitlab.com/ric_harvey/nginx-php-fpm/badges/master/pipeline.svg)] +![pipeline status](https://gitlab.com/ric_harvey/nginx-php-fpm/badges/master/pipeline.svg) ![docker hub](https://img.shields.io/docker/pulls/richarvey/nginx-php-fpm.svg?style=flat) ![docker hub](https://img.shields.io/docker/stars/richarvey/nginx-php-fpm.svg?style=flat) From 7d9882a5e29cfb0dc8e4a8034f5dcfab4767aa11 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Thu, 21 Mar 2019 21:49:43 +0000 Subject: [PATCH 69/90] update docs --- README.md | 2 +- docs/versioning.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 66c4b7a0..479124a4 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.6.6 | Master Branch |1.14.2 | 7.3.3 | 3.9 | +| latest/1.6.7 | Master Branch |1.14.2 | 7.3.3 | 3.9 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index b09000ea..265a21d9 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -24,6 +24,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.6.4 | 7.3.3 |1.14.2 | 3.9 | 0.3.12 | | 1.6.5 | 7.3.3 |1.14.2 | 3.9 | 0.3.12 | | 1.6.6 | 7.3.3 |1.14.2 | 3.9 | 0.3.12 | +| 1.6.7 | 7.3.3 |1.14.2 | 3.9 | 0.3.13 | #### PHP 7.2 From aa2c30a921738e06f149cc0211f14ab44bd06257 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Fri, 5 Apr 2019 15:06:55 +0100 Subject: [PATCH 70/90] Roll back CUSTOM root changes and bump PHP 7.3.4 --- Dockerfile | 2 +- README.md | 6 ++--- docs/config_flags.md | 2 -- docs/nginx_configs.md | 1 - docs/scripting_templating.md | 1 - docs/versioning.md | 27 +++++++++++---------- scripts/start.sh | 47 +++++++++++++++--------------------- 7 files changed, 37 insertions(+), 49 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf71843f..5381f407 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3.3-fpm-alpine3.9 +FROM php:7.3.4-fpm-alpine3.9 LABEL maintainer="Ric Harvey " diff --git a/README.md b/README.md index 479124a4..fc8a5d43 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![pipeline status](https://gitlab.com/ric_harvey/nginx-php-fpm/badges/master/pipeline.svg) -![docker hub](https://img.shields.io/docker/pulls/richarvey/nginx-php-fpm.svg?style=flat) -![docker hub](https://img.shields.io/docker/stars/richarvey/nginx-php-fpm.svg?style=flat) +![docker hub](https://img.shields.io/docker/pulls/richarvey/nginx-php-fpm.svg?style=flat-square) +![docker hub](https://img.shields.io/docker/stars/richarvey/nginx-php-fpm.svg?style=flat-square) ## Overview This is a Dockerfile/image to build a container for nginx and php-fpm, with the ability to pull website code from git when the container is created, as well as allowing the container to push and pull changes to the code to and from git. The container also has the ability to update templated files with variables passed to docker in order to update your code and settings. There is support for lets encrypt SSL configurations, custom nginx configs, core nginx/PHP variable overrides for running preferences, X-Forwarded-For headers and UID mapping for local volume support. @@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.6.7 | Master Branch |1.14.2 | 7.3.3 | 3.9 | +| latest/1.6.8 | Master Branch |1.14.2 | 7.3.4 | 3.9 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/config_flags.md b/docs/config_flags.md index b9cd31a4..c1b8a6bf 100644 --- a/docs/config_flags.md +++ b/docs/config_flags.md @@ -21,7 +21,6 @@ The following flags are a list of all the currently supported options that can b | Name | Description | |-------------------------|----------------------------------------------------------------------------------------------------------------| | WEBROOT | Change the default webroot directory from `/var/www/html` to your own setting | -| CONFIG_FOLDER | Change the default config directory from `/var/www/html/conf` to your own setting | | ERRORS | Set to 1 to display PHP Errors in the browser | | HIDE_NGINX_HEADERS | Disable by setting to 0, default behaviour is to hide nginx + php version in headers | | PHP_MEM_LIMIT | Set higher PHP memory limit, default is 128 Mb | @@ -32,7 +31,6 @@ The following flags are a list of all the currently supported options that can b | REAL_IP_HEADER | set to 1 to enable real ip support in the logs | | REAL_IP_FROM | set to your CIDR block for real ip in logs | | RUN_SCRIPTS | Set to 1 to execute scripts | -| SCRIPTS_FOLDER | Change the default script folder from `/var/www/html/scripts` to your won setting | | PGID | Set to GroupId you want to use for nginx (helps permissions when using local volume) | | PUID | Set to UserID you want to use for nginx (helps permissions when using local volume) | | REMOVE_FILES | Use REMOVE_FILES=0 to prevent the script from clearing out /var/www/html (useful for working with local files) | diff --git a/docs/nginx_configs.md b/docs/nginx_configs.md index 5e18f82a..436a798f 100644 --- a/docs/nginx_configs.md +++ b/docs/nginx_configs.md @@ -1,6 +1,5 @@ ## Custom Nginx Config files Sometimes you need a custom config file for nginx to do rewrites or password protection, etc. For this reason we've included the ability to have custom nginx configs pulled directly from your git source. Please have a read of the [repo layout guidelines](repo_layout.md) for more information. Its pretty simple to enable this, all you need to do is include a folder in the root of your repository called ```conf/nginx/``` within this folder you need to include a file called ```nginx-site.conf``` which will contain your default nginx site config. If you wish to have a custom file for SSL you simply include a file called ```nginx-site-ssl.conf``` in the same directory. These files will then be swapped in after you code is cloned. -In addition, you can configure __CONFIG_FOLDER__ with your custome path. ## REAL IP / X-Forwarded-For Headers If you operate your container behind a load balancer, an ELB on AWS for example, you need to configure nginx to get the real IP and not the load balancer IP in the logs by using the X-Forwarded-For. We've provided some handy flags to let you do this. You need to set both of these to get this to work: diff --git a/docs/scripting_templating.md b/docs/scripting_templating.md index 30693a83..02ab7153 100644 --- a/docs/scripting_templating.md +++ b/docs/scripting_templating.md @@ -1,6 +1,5 @@ ## Scripting There is often an occasion where you need to run a script on code to do a transformation once code lands in the container. For this reason we have developed scripting support. By including a scripts folder in your git repository and passing the __RUN_SCRIPTS=1__ flag to your command line the container will execute your scripts. Please see the [repo layout guidelines](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/repo_layout.md) for more details on how to organise this. -In addition, you can configure __SCRIPT_FOLDER__ with your custome path. ## Using environment variables / templating To set the variables pass them in as environment variables on the docker command line. diff --git a/docs/versioning.md b/docs/versioning.md index 265a21d9..8ec0ff8c 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -15,17 +15,21 @@ The latest tag will always follow the master branch in git. the other versions w #### PHP 7.3 -| Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | -|-----|-------|-----|--------|--------| -| 1.6.0 | 7.3.2 |1.14.2 | 3.9 | 0.3.8 | -| 1.6.1 | 7.3.2 |1.14.2 | 3.9 | 0.3.9 | -| 1.6.2 | 7.3.3 |1.14.2 | 3.9 | 0.3.10 | -| 1.6.3 | 7.3.3 |1.14.2 | 3.9 | 0.3.11 | -| 1.6.4 | 7.3.3 |1.14.2 | 3.9 | 0.3.12 | -| 1.6.5 | 7.3.3 |1.14.2 | 3.9 | 0.3.12 | -| 1.6.6 | 7.3.3 |1.14.2 | 3.9 | 0.3.12 | -| 1.6.7 | 7.3.3 |1.14.2 | 3.9 | 0.3.13 | +| Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | Notes | +|-----|-------|-----|--------|--------|----------| +| 1.6.0 | 7.3.2 |1.14.2 | 3.9 | 0.3.8 || +| 1.6.1 | 7.3.2 |1.14.2 | 3.9 | 0.3.9 || +| 1.6.2 | 7.3.3 |1.14.2 | 3.9 | 0.3.10 || +| 1.6.3 | 7.3.3 |1.14.2 | 3.9 | 0.3.11 || +| 1.6.4 | 7.3.3 |1.14.2 | 3.9 | 0.3.12 || +| 1.6.5 | 7.3.3 |1.14.2 | 3.9 | 0.3.12 || +| 1.6.6 | 7.3.3 |1.14.2 | 3.9 | 0.3.12 || +| 1.6.7 | 7.3.3 |1.14.2 | 3.9 | 0.3.13 | Broken | +| 1.6.8 | 7.3.4 |1.14.2 | 3.9 | 0.3.12 | Custom scripts rolled back | + +These tags will be created on GitLab and as tags in docker hub. +### Unmaintained tags: #### PHP 7.2 | Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | @@ -41,9 +45,6 @@ The latest tag will always follow the master branch in git. the other versions w | 1.5.6 | 7.2.9 |1.14.0 | 3.7 | 0.3.8 | | 1.5.7 | 7.2.10 |1.14.0 | 3.7 | 0.3.8 | -These tags will be created on GitLab and as tags in docker hub. - -### Unmaintained tags: #### PHP 7.1 | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | Container Scripts | diff --git a/scripts/start.sh b/scripts/start.sh index 5140a27f..04e789bd 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -21,7 +21,7 @@ fi if [ ! -z "$WEBROOT" ]; then sed -i "s#root /var/www/html;#root ${WEBROOT};#g" /etc/nginx/sites-available/default.conf else - WEBROOT=/var/www/html + webroot=/var/www/html fi # Setup git variables @@ -34,14 +34,14 @@ if [ ! -z "$GIT_NAME" ]; then fi # Dont pull code down if the .git folder exists -if [ ! -d "${WEBROOT}/.git" ]; then +if [ ! -d "/var/www/html/.git" ]; then # Pull down code from git for our site! if [ ! -z "$GIT_REPO" ]; then # Remove the test index file if you are pulling in a git repo if [ ! -z ${REMOVE_FILES} ] && [ ${REMOVE_FILES} == 0 ]; then echo "skiping removal of files" else - rm -Rf ${WEBROOT}/* + rm -Rf /var/www/html/* fi GIT_COMMAND='git clone ' if [ ! -z "$GIT_BRANCH" ]; then @@ -57,7 +57,7 @@ if [ ! -d "${WEBROOT}/.git" ]; then GIT_COMMAND=${GIT_COMMAND}" https://${GIT_USERNAME}:${GIT_PERSONAL_TOKEN}@${GIT_REPO}" fi fi - ${GIT_COMMAND} ${WEBROOT} || exit 1 + ${GIT_COMMAND} /var/www/html || exit 1 if [ ! -z "$GIT_TAG" ]; then git checkout ${GIT_TAG} || exit 1 fi @@ -65,26 +65,22 @@ if [ ! -d "${WEBROOT}/.git" ]; then git checkout ${GIT_COMMIT} || exit 1 fi if [ -z "$SKIP_CHOWN" ]; then - chown -Rf nginx.nginx ${WEBROOT} + chown -Rf nginx.nginx /var/www/html fi fi fi -if [ -z "$CONFIG_FOLDER" ]; then - CONFIG_FOLDER=${WEBROOT}/conf -fi - # Enable custom nginx config files if they exist -if [ -f ${CONFIG_FOLDER}/nginx.conf ]; then - cp ${CONFIG_FOLDER}/nginx.conf /etc/nginx/nginx.conf +if [ -f /var/www/html/conf/nginx/nginx.conf ]; then + cp /var/www/html/conf/nginx/nginx.conf /etc/nginx/nginx.conf fi -if [ -f ${CONFIG_FOLDER}/nginx-site.conf ]; then - cp ${CONFIG_FOLDER}/nginx-site.conf /etc/nginx/sites-available/default.conf +if [ -f /var/www/html/conf/nginx/nginx-site.conf ]; then + cp /var/www/html/conf/nginx/nginx-site.conf /etc/nginx/sites-available/default.conf fi -if [ -f ${CONFIG_FOLDER}/nginx-site-ssl.conf ]; then - cp ${CONFIG_FOLDER}/nginx-site-ssl.conf /etc/nginx/sites-available/default-ssl.conf +if [ -f /var/www/html/conf/nginx/nginx-site-ssl.conf ]; then + cp /var/www/html/conf/nginx/nginx-site-ssl.conf /etc/nginx/sites-available/default-ssl.conf fi @@ -177,7 +173,7 @@ if [[ "$ENABLE_XDEBUG" == "1" ]] ; then fi fi fi -else +else if [ -f $XdebugFile ]; then echo "Disabling Xdebug" rm $XdebugFile @@ -193,22 +189,17 @@ if [ ! -z "$PUID" ]; then adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx -u ${PUID} nginx else if [ -z "$SKIP_CHOWN" ]; then - chown -Rf nginx.nginx ${WEBROOT} + chown -Rf nginx.nginx /var/www/html fi fi # Run custom scripts if [[ "$RUN_SCRIPTS" == "1" ]] ; then - - if [ -z "$SCRIPTS_FOLDER" ]; then - SCRIPTS_FOLDER=${WEBROOT}/scripts/ - fi - - if [ -d "${SCRIPTS_FOLDER}" ]; then + if [ -d "/var/www/html/scripts/" ]; then # make scripts executable incase they aren't - chmod -Rf 750 ${SCRIPTS_FOLDER}/*; sync; + chmod -Rf 750 /var/www/html/scripts/*; sync; # run scripts in number order - for i in `ls ${SCRIPTS_FOLDER}/`; do ${SCRIPTS_FOLDER}/$i ; done + for i in `ls /var/www/html/scripts/`; do /var/www/html/scripts/$i ; done else echo "Can't find script directory" fi @@ -216,13 +207,13 @@ fi if [ -z "$SKIP_COMPOSER" ]; then # Try auto install for composer - if [ -f "${WEBROOT}/composer.lock" ]; then + if [ -f "/var/www/html/composer.lock" ]; then if [ "$APPLICATION_ENV" == "development" ]; then composer global require hirak/prestissimo - composer install --working-dir=${WEBROOT} + composer install --working-dir=/var/www/html else composer global require hirak/prestissimo - composer install --no-dev --working-dir=${WEBROOT} + composer install --no-dev --working-dir=/var/www/html fi fi fi From eacb2ad1e7259949459da33a4df77a7e2352beb9 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Fri, 26 Apr 2019 20:06:00 +0100 Subject: [PATCH 71/90] Move to nginx 1.16.0 new stable --- Dockerfile | 2 +- README.md | 2 +- docs/versioning.md | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5381f407..cf52b542 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ENV php_conf /usr/local/etc/php-fpm.conf ENV fpm_conf /usr/local/etc/php-fpm.d/www.conf ENV php_vars /usr/local/etc/php/conf.d/docker-vars.ini -ENV NGINX_VERSION 1.14.2 +ENV NGINX_VERSION 1.16.0 ENV LUA_MODULE_VERSION 0.10.14 ENV DEVEL_KIT_MODULE_VERSION 0.3.0 ENV LUAJIT_LIB=/usr/lib diff --git a/README.md b/README.md index fc8a5d43..cea07b73 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.6.8 | Master Branch |1.14.2 | 7.3.4 | 3.9 | +| latest/1.7.0 | Master Branch |1.16.0 | 7.3.4 | 3.9 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 8ec0ff8c..034dce5c 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -26,6 +26,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.6.6 | 7.3.3 |1.14.2 | 3.9 | 0.3.12 || | 1.6.7 | 7.3.3 |1.14.2 | 3.9 | 0.3.13 | Broken | | 1.6.8 | 7.3.4 |1.14.2 | 3.9 | 0.3.12 | Custom scripts rolled back | +| 1.7.0 | 7.3.4 |1.16.0 | 3.9 | 0.3.12 | First move to nginx 1.16.0 | These tags will be created on GitLab and as tags in docker hub. From ccc75085eb33241ca55b8928a947edca52f60d62 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Sat, 4 May 2019 11:19:45 +0100 Subject: [PATCH 72/90] Upgrade PHP to 7.3.5 --- Dockerfile | 2 +- README.md | 2 +- docs/versioning.md | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cf52b542..7a2eb5c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3.4-fpm-alpine3.9 +FROM php:7.3.5-fpm-alpine3.9 LABEL maintainer="Ric Harvey " diff --git a/README.md b/README.md index cea07b73..60738a2d 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.7.0 | Master Branch |1.16.0 | 7.3.4 | 3.9 | +| latest/1.7.1 | Master Branch |1.16.0 | 7.3.5 | 3.9 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 034dce5c..13a3cd31 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -27,6 +27,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.6.7 | 7.3.3 |1.14.2 | 3.9 | 0.3.13 | Broken | | 1.6.8 | 7.3.4 |1.14.2 | 3.9 | 0.3.12 | Custom scripts rolled back | | 1.7.0 | 7.3.4 |1.16.0 | 3.9 | 0.3.12 | First move to nginx 1.16.0 | +| 1.7.1 | 7.3.5 |1.16.0 | 3.9 | 0.3.12 | Bump to PHP 7.3.5 | These tags will be created on GitLab and as tags in docker hub. From 0003610932ecf3b614f4268205eb3c6a08912a54 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Wed, 5 Jun 2019 10:28:13 +0100 Subject: [PATCH 73/90] add project url --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 60738a2d..46d14591 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ ![docker hub](https://img.shields.io/docker/pulls/richarvey/nginx-php-fpm.svg?style=flat-square) ![docker hub](https://img.shields.io/docker/stars/richarvey/nginx-php-fpm.svg?style=flat-square) +## Please open pull requests and issues on [https://gitlab.com/ric_harvey/nginx-php-fpm](https://gitlab.com/ric_harvey/nginx-php-fpm) + ## Overview This is a Dockerfile/image to build a container for nginx and php-fpm, with the ability to pull website code from git when the container is created, as well as allowing the container to push and pull changes to the code to and from git. The container also has the ability to update templated files with variables passed to docker in order to update your code and settings. There is support for lets encrypt SSL configurations, custom nginx configs, core nginx/PHP variable overrides for running preferences, X-Forwarded-For headers and UID mapping for local volume support. From 2a034232dcff9cb23a5606211d2e8a3565588193 Mon Sep 17 00:00:00 2001 From: Ric Harvey <532137+richarvey@users.noreply.github.com> Date: Wed, 5 Jun 2019 10:40:14 +0100 Subject: [PATCH 74/90] Create FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..a51fd4e9 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: [richarvey] From 6d9f8a42a8f55c44542c64b2a7fbd70354bec1d6 Mon Sep 17 00:00:00 2001 From: Ric Harvey <532137+richarvey@users.noreply.github.com> Date: Wed, 5 Jun 2019 10:59:12 +0100 Subject: [PATCH 75/90] Update FUNDING.yml --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index a51fd4e9..8f644234 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1 @@ -github: [richarvey] +patreon: richarvey From 7d90473a8355265787ffdd9c9bfefc7677c0196a Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Wed, 5 Jun 2019 11:14:33 +0100 Subject: [PATCH 76/90] Upgrade to PHP 7.3.6 --- Dockerfile | 2 +- README.md | 2 +- docs/versioning.md | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7a2eb5c7..bd20baff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3.5-fpm-alpine3.9 +FROM php:7.3.6-fpm-alpine3.9 LABEL maintainer="Ric Harvey " diff --git a/README.md b/README.md index 46d14591..12cf337f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.7.1 | Master Branch |1.16.0 | 7.3.5 | 3.9 | +| latest/1.7.1 | Master Branch |1.16.0 | 7.3.6 | 3.9 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 13a3cd31..fd6986d2 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -28,6 +28,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.6.8 | 7.3.4 |1.14.2 | 3.9 | 0.3.12 | Custom scripts rolled back | | 1.7.0 | 7.3.4 |1.16.0 | 3.9 | 0.3.12 | First move to nginx 1.16.0 | | 1.7.1 | 7.3.5 |1.16.0 | 3.9 | 0.3.12 | Bump to PHP 7.3.5 | +| 1.7.2 | 7.3.6 |1.16.0 | 3.9 | 0.3.12 | Bump to PHP 7.3.6 | These tags will be created on GitLab and as tags in docker hub. From a705f20d3c31d96b351aceebb3aa3f729cdb9b8f Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Thu, 20 Jun 2019 12:33:39 +0100 Subject: [PATCH 77/90] update xdebug to 2.7.2 closes #276 --- Dockerfile | 2 +- README.md | 2 +- docs/versioning.md | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bd20baff..e3180f93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -202,7 +202,7 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo #curl iconv session #docker-php-ext-install pdo_mysql pdo_sqlite mysqli mcrypt gd exif intl xsl json soap dom zip opcache && \ docker-php-ext-install iconv pdo_mysql pdo_sqlite pgsql pdo_pgsql mysqli gd exif intl xsl json soap dom zip opcache && \ - pecl install xdebug-2.7.0RC1 && \ + pecl install xdebug-2.7.2 && \ pecl install -o -f redis && \ echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini && \ docker-php-source delete && \ diff --git a/README.md b/README.md index 12cf337f..c559ac3a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.7.1 | Master Branch |1.16.0 | 7.3.6 | 3.9 | +| latest/1.7.3 | Master Branch |1.16.0 | 7.3.6 | 3.9 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index fd6986d2..4b0e87d0 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -29,6 +29,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.7.0 | 7.3.4 |1.16.0 | 3.9 | 0.3.12 | First move to nginx 1.16.0 | | 1.7.1 | 7.3.5 |1.16.0 | 3.9 | 0.3.12 | Bump to PHP 7.3.5 | | 1.7.2 | 7.3.6 |1.16.0 | 3.9 | 0.3.12 | Bump to PHP 7.3.6 | +| 1.7.3 | 7.3.6 |1.16.0 | 3.9 | 0.3.12 | Bump xdebug 2.7.2 | These tags will be created on GitLab and as tags in docker hub. From 3a3b50cfdc6d3656ba3980142fb05920cbd0df0c Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Wed, 24 Jul 2019 09:10:35 +0100 Subject: [PATCH 78/90] upgrade php to 7.3.7 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e3180f93..b57e445d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3.6-fpm-alpine3.9 +FROM php:7.3.7-fpm-alpine3.9 LABEL maintainer="Ric Harvey " From 5fe1b3654bda9717ddd09d34bda278e522700f0f Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 5 Aug 2019 12:21:31 +0100 Subject: [PATCH 79/90] update to php 7.3.8 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b57e445d..c0c5b736 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3.7-fpm-alpine3.9 +FROM php:7.3.8-fpm-alpine3.9 LABEL maintainer="Ric Harvey " From 42a09f79d24c2988f57b2a22d87c53e512f5b7f0 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 5 Aug 2019 12:24:20 +0100 Subject: [PATCH 80/90] update docs --- README.md | 2 +- docs/versioning.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c559ac3a..5df7214d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.7.3 | Master Branch |1.16.0 | 7.3.6 | 3.9 | +| latest/1.7.4 | Master Branch |1.16.0 | 7.3.8 | 3.9 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 4b0e87d0..722c6a9d 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -30,6 +30,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.7.1 | 7.3.5 |1.16.0 | 3.9 | 0.3.12 | Bump to PHP 7.3.5 | | 1.7.2 | 7.3.6 |1.16.0 | 3.9 | 0.3.12 | Bump to PHP 7.3.6 | | 1.7.3 | 7.3.6 |1.16.0 | 3.9 | 0.3.12 | Bump xdebug 2.7.2 | +| 1.7.4 | 7.3.8 |1.16.0 | 3.9 | 0.3.12 | upgrade php to 7.3.8 | These tags will be created on GitLab and as tags in docker hub. From 2e1199157394f7558075ed93293eb73556bb4595 Mon Sep 17 00:00:00 2001 From: Marcus Welz Date: Sun, 1 Sep 2019 00:07:44 -0400 Subject: [PATCH 81/90] feat: Support ngx_http_geoip2_module --- Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c0c5b736..276a3a5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ ENV php_vars /usr/local/etc/php/conf.d/docker-vars.ini ENV NGINX_VERSION 1.16.0 ENV LUA_MODULE_VERSION 0.10.14 ENV DEVEL_KIT_MODULE_VERSION 0.3.0 +ENV GEOIP2_MODULE_VERSION 3.2 ENV LUAJIT_LIB=/usr/lib ENV LUAJIT_INC=/usr/include/luajit-2.1 @@ -64,6 +65,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ --with-http_v2_module \ --add-module=/usr/src/ngx_devel_kit-$DEVEL_KIT_MODULE_VERSION \ --add-module=/usr/src/lua-nginx-module-$LUA_MODULE_VERSION \ + --add-module=/usr/src/ngx_http_geoip2_module-$GEOIP2_MODULE_VERSION \ " \ && addgroup -S nginx \ && adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx \ @@ -81,12 +83,14 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ libxslt-dev \ gd-dev \ geoip-dev \ + libmaxminddb-dev \ perl-dev \ luajit-dev \ && curl -fSL http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -o nginx.tar.gz \ && curl -fSL http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz.asc -o nginx.tar.gz.asc \ && curl -fSL https://github.com/simpl/ngx_devel_kit/archive/v$DEVEL_KIT_MODULE_VERSION.tar.gz -o ndk.tar.gz \ && curl -fSL https://github.com/openresty/lua-nginx-module/archive/v$LUA_MODULE_VERSION.tar.gz -o lua.tar.gz \ + && curl -fSL https://github.com/leev/ngx_http_geoip2_module/archive/$GEOIP2_MODULE_VERSION.tar.gz -o ngx_http_geoip2_module.tar.gz \ && export GNUPGHOME="$(mktemp -d)" \ && found=''; \ for server in \ @@ -105,7 +109,8 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ && tar -zxC /usr/src -f nginx.tar.gz \ && tar -zxC /usr/src -f ndk.tar.gz \ && tar -zxC /usr/src -f lua.tar.gz \ - && rm nginx.tar.gz ndk.tar.gz lua.tar.gz \ + && tar -zxC /usr/src -f ngx_http_geoip2_module.tar.gz \ + && rm nginx.tar.gz ndk.tar.gz lua.tar.gz ngx_http_geoip2_module.tar.gz \ && cd /usr/src/nginx-$NGINX_VERSION \ && ./configure $CONFIG --with-debug \ && make -j$(getconf _NPROCESSORS_ONLN) \ @@ -133,6 +138,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ && strip /usr/sbin/nginx* \ && strip /usr/lib/nginx/modules/*.so \ && rm -rf /usr/src/nginx-$NGINX_VERSION \ + && rm -rf /usr/src/ngx_http_geoip2_module-$GEOIP2_MODULE_VERSION \ \ # Bring in gettext so we can get `envsubst`, then throw # the rest away. To do this, we need to install `gettext` From addfa1a5a548798829cff43b08509a75cb08614b Mon Sep 17 00:00:00 2001 From: Marcus Welz Date: Tue, 10 Sep 2019 20:37:30 -0400 Subject: [PATCH 82/90] config: expose GeoLite2 data via env vars Adds GeoLite2 databases and configures nginx to expose the data via GEOIP2_ namespaced environment variables. --- Dockerfile | 6 ++++++ conf/nginx-site-ssl.conf | 10 ++++++++++ conf/nginx-site.conf | 10 ++++++++++ conf/nginx.conf | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+) diff --git a/Dockerfile b/Dockerfile index 276a3a5b..3fdc4e54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -242,6 +242,12 @@ ADD conf/nginx-site.conf /etc/nginx/sites-available/default.conf ADD conf/nginx-site-ssl.conf /etc/nginx/sites-available/default-ssl.conf RUN ln -s /etc/nginx/sites-available/default.conf /etc/nginx/sites-enabled/default.conf +# Add GeoLite2 databases (https://dev.maxmind.com/geoip/geoip2/geolite2/) +RUN curl -fSL http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz -o /etc/nginx/GeoLite2-City.mmdb.gz \ + && curl -fSL http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz -o /etc/nginx/GeoLite2-Country.mmdb.gz \ + && gunzip /etc/nginx/GeoLite2-City.mmdb.gz \ + && gunzip /etc/nginx/GeoLite2-Country.mmdb.gz + # tweak php-fpm config RUN echo "cgi.fix_pathinfo=0" > ${php_vars} &&\ echo "upload_max_filesize = 100M" >> ${php_vars} &&\ diff --git a/conf/nginx-site-ssl.conf b/conf/nginx-site-ssl.conf index b0224455..13c286fa 100644 --- a/conf/nginx-site-ssl.conf +++ b/conf/nginx-site-ssl.conf @@ -63,6 +63,16 @@ server { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_index index.php; + fastcgi_param GEOIP2_LONGITUDE $geoip2_data_longitude; + fastcgi_param GEOIP2_LATITUDE $geoip2_data_latitude; + fastcgi_param GEOIP2_CONTINENT_CODE $geoip2_data_continent_code; + fastcgi_param GEOIP2_CONTINENT_NAME $geoip2_data_continent_name; + fastcgi_param GEOIP2_COUNTRY_CODE $geoip2_data_country_code; + fastcgi_param GEOIP2_COUNTRY_NAME $geoip2_data_country_name; + fastcgi_param GEOIP2_STATE_CODE $geoip2_data_state_code; + fastcgi_param GEOIP2_STATE_NAME $geoip2_data_state_name; + fastcgi_param GEOIP2_CITY_NAME $geoip2_data_city_name; + fastcgi_param GEOIP2_POSTAL_CODE $geoip2_data_postal_code; include fastcgi_params; } diff --git a/conf/nginx-site.conf b/conf/nginx-site.conf index 3c38946e..728ba5b0 100644 --- a/conf/nginx-site.conf +++ b/conf/nginx-site.conf @@ -59,6 +59,16 @@ server { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_index index.php; + fastcgi_param GEOIP2_LONGITUDE $geoip2_data_longitude; + fastcgi_param GEOIP2_LATITUDE $geoip2_data_latitude; + fastcgi_param GEOIP2_CONTINENT_CODE $geoip2_data_continent_code; + fastcgi_param GEOIP2_CONTINENT_NAME $geoip2_data_continent_name; + fastcgi_param GEOIP2_COUNTRY_CODE $geoip2_data_country_code; + fastcgi_param GEOIP2_COUNTRY_NAME $geoip2_data_country_name; + fastcgi_param GEOIP2_STATE_CODE $geoip2_data_state_code; + fastcgi_param GEOIP2_STATE_NAME $geoip2_data_state_name; + fastcgi_param GEOIP2_CITY_NAME $geoip2_data_city_name; + fastcgi_param GEOIP2_POSTAL_CODE $geoip2_data_postal_code; include fastcgi_params; } diff --git a/conf/nginx.conf b/conf/nginx.conf index bcda82ad..2df88214 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -33,6 +33,38 @@ http { server_tokens off; #gzip on; + geoip2 /etc/nginx/GeoLite2-Country.mmdb { + auto_reload 1h; + + $geoip2_metadata_country_build metadata build_epoch; + + # populate the country + $geoip2_data_country_code source=$remote_addr country iso_code; + $geoip2_data_country_name source=$remote_addr country names en; + + # populate the continent + $geoip2_data_continent_code source=$remote_addr continent code; + $geoip2_data_continent_name source=$remote_addr continent names en; + } + + geoip2 /etc/nginx/GeoLite2-City.mmdb { + auto_reload 1h; + + # City name itself + $geoip2_data_city_name source=$remote_addr city names en; + + # Postal code will be an approximation, probably the first one in the list that covers an area + $geoip2_data_postal_code source=$remote_addr postal code; + + # State in code and long form + $geoip2_data_state_code source=$remote_addr subdivisions 0 iso_code; + $geoip2_data_state_name source=$remote_addr subdivisions 0 names en; + + # Lat and Lng + $geoip2_data_latitude source=$remote_addr location latitude; + $geoip2_data_longitude source=$remote_addr location longitude; + } + include /etc/nginx/sites-enabled/*; } #daemon off; From 5d5a734bd1d437e2bb4e49a4e4955839f5eceba6 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 17 Sep 2019 12:31:28 +0100 Subject: [PATCH 83/90] Upgrade alpine to 3.10, php 7.3.9, nginx 1.16.1 closes #287 --- Dockerfile | 4 ++-- README.md | 2 +- docs/versioning.md | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index c0c5b736..807bf825 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3.8-fpm-alpine3.9 +FROM php:7.3.9-fpm-alpine3.10 LABEL maintainer="Ric Harvey " @@ -6,7 +6,7 @@ ENV php_conf /usr/local/etc/php-fpm.conf ENV fpm_conf /usr/local/etc/php-fpm.d/www.conf ENV php_vars /usr/local/etc/php/conf.d/docker-vars.ini -ENV NGINX_VERSION 1.16.0 +ENV NGINX_VERSION 1.16.1 ENV LUA_MODULE_VERSION 0.10.14 ENV DEVEL_KIT_MODULE_VERSION 0.3.0 ENV LUAJIT_LIB=/usr/lib diff --git a/README.md b/README.md index 5df7214d..957095f7 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.7.4 | Master Branch |1.16.0 | 7.3.8 | 3.9 | +| latest/1.8.0 | Master Branch |1.16.1 | 7.3.9 | 3.10 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 722c6a9d..10d36b86 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -31,6 +31,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.7.2 | 7.3.6 |1.16.0 | 3.9 | 0.3.12 | Bump to PHP 7.3.6 | | 1.7.3 | 7.3.6 |1.16.0 | 3.9 | 0.3.12 | Bump xdebug 2.7.2 | | 1.7.4 | 7.3.8 |1.16.0 | 3.9 | 0.3.12 | upgrade php to 7.3.8 | +| 1.8.0 | 7.3.9 |1.16.1 | 3.10 | 0.3.12 | Alpine upgrade to 3.10, PHP 7.3.9 and nginx 1.16.1 upgrades | These tags will be created on GitLab and as tags in docker hub. From c5b28332d610cbbcffe562189c7c2c538dfab20c Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 17 Sep 2019 12:52:35 +0100 Subject: [PATCH 84/90] Working towards issue #283 and using py3 however python2 is a burried dependancey --- Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 807bf825..daa61d1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -172,9 +172,8 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo imap-dev \ openssl-dev \ git \ - python \ - python-dev \ - py-pip \ + python3 \ + python3-dev \ augeas-dev \ libressl-dev \ ca-certificates \ @@ -213,10 +212,10 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ php composer-setup.php --quiet --install-dir=/usr/bin --filename=composer && \ rm composer-setup.php && \ - pip install -U pip && \ - pip install -U certbot && \ + pip3 install -U pip && \ + pip3 install -U certbot && \ mkdir -p /etc/letsencrypt/webrootauth && \ - apk del gcc musl-dev linux-headers libffi-dev augeas-dev python-dev make autoconf + apk del gcc musl-dev linux-headers libffi-dev augeas-dev python3-dev make autoconf # apk del .sys-deps # ln -s /usr/bin/php7 /usr/bin/php From 454fcd7c0734b808c0115a998aab27c7e3229da4 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 17 Sep 2019 13:02:39 +0100 Subject: [PATCH 85/90] [skip ci] document update --- README.md | 2 +- docs/versioning.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 957095f7..ed5e410f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.8.0 | Master Branch |1.16.1 | 7.3.9 | 3.10 | +| latest/1.8.1 | Master Branch |1.16.1 | 7.3.9 | 3.10 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 10d36b86..29145c9f 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -32,6 +32,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.7.3 | 7.3.6 |1.16.0 | 3.9 | 0.3.12 | Bump xdebug 2.7.2 | | 1.7.4 | 7.3.8 |1.16.0 | 3.9 | 0.3.12 | upgrade php to 7.3.8 | | 1.8.0 | 7.3.9 |1.16.1 | 3.10 | 0.3.12 | Alpine upgrade to 3.10, PHP 7.3.9 and nginx 1.16.1 upgrades | +| 1.8.1 | 7.3.9 |1.16.1 | 3.10 | 0.3.12 | started python upgrade | These tags will be created on GitLab and as tags in docker hub. From defd1fddd39c418aea83463dadca83392abf4133 Mon Sep 17 00:00:00 2001 From: Philip Z Date: Tue, 17 Sep 2019 12:08:06 +0000 Subject: [PATCH 86/90] Bugfix/fix xdebug remote prefix --- docs/config_flags.md | 1 + scripts/start.sh | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/config_flags.md b/docs/config_flags.md index c1b8a6bf..52b0cfb9 100644 --- a/docs/config_flags.md +++ b/docs/config_flags.md @@ -23,6 +23,7 @@ The following flags are a list of all the currently supported options that can b | WEBROOT | Change the default webroot directory from `/var/www/html` to your own setting | | ERRORS | Set to 1 to display PHP Errors in the browser | | HIDE_NGINX_HEADERS | Disable by setting to 0, default behaviour is to hide nginx + php version in headers | +| PHP_CATCHALL | Enable a 404 catch all to `index.php` -- changes `=404` on `try_files` to `/index.php?$args` | | PHP_MEM_LIMIT | Set higher PHP memory limit, default is 128 Mb | | PHP_POST_MAX_SIZE | Set a larger post_max_size, default is 100 Mb | | PHP_UPLOAD_MAX_FILESIZE | Set a larger upload_max_filesize, default is 100 Mb | diff --git a/scripts/start.sh b/scripts/start.sh index 04e789bd..13e3dab8 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -24,6 +24,12 @@ else webroot=/var/www/html fi +# Enables 404 pages through php index +if [ ! -z "$PHP_CATCHALL" ]; then + sed -i 's#try_files $uri $uri/ =404;#try_files $uri $uri/ /index.php?$args;#g' /etc/nginx/sites-available/default.conf +fi + + # Setup git variables if [ ! -z "$GIT_EMAIL" ]; then git config --global user.email "$GIT_EMAIL" @@ -165,7 +171,7 @@ if [[ "$ENABLE_XDEBUG" == "1" ]] ; then else echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > $XdebugFile # Note, single arrow to overwrite file. echo "xdebug.remote_enable=1 " >> $XdebugFile - echo "remote_host=host.docker.internal" >> $XdebugFile + echo "xdebug.remote_host=host.docker.internal" >> $XdebugFile echo "xdebug.remote_log=/tmp/xdebug.log" >> $XdebugFile echo "xdebug.remote_autostart=false " >> $XdebugFile # I use the xdebug chrome extension instead of using autostart # NOTE: xdebug.remote_host is not needed here if you set an environment variable in docker-compose like so `- XDEBUG_CONFIG=remote_host=192.168.111.27`. From 218147f77ac9b79541d92c9e5fe9637df3802e28 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Tue, 17 Sep 2019 13:26:27 +0100 Subject: [PATCH 87/90] Release for 1.8.2 --- README.md | 2 +- docs/versioning.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ed5e410f..56523b80 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.8.1 | Master Branch |1.16.1 | 7.3.9 | 3.10 | +| latest/1.8.2 | Master Branch |1.16.1 | 7.3.9 | 3.10 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 29145c9f..01728577 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -33,6 +33,7 @@ The latest tag will always follow the master branch in git. the other versions w | 1.7.4 | 7.3.8 |1.16.0 | 3.9 | 0.3.12 | upgrade php to 7.3.8 | | 1.8.0 | 7.3.9 |1.16.1 | 3.10 | 0.3.12 | Alpine upgrade to 3.10, PHP 7.3.9 and nginx 1.16.1 upgrades | | 1.8.1 | 7.3.9 |1.16.1 | 3.10 | 0.3.12 | started python upgrade | +| 1.8.2 | 7.3.9 |1.16.1 | 3.10 | 0.3.13 | geoip2, catchall and xdebug.remote merges | These tags will be created on GitLab and as tags in docker hub. From 5f7fcc2d5fbd3edefd76eac3e5270122be7000c2 Mon Sep 17 00:00:00 2001 From: ric Date: Mon, 3 Feb 2020 22:08:43 +0000 Subject: [PATCH 88/90] updated to php 7.4.2 but geoip is broken - to fix --- Dockerfile | 43 ++++++++++++++------------- README.md | 2 +- conf/nginx-site-ssl.conf | 20 ++++++------- conf/nginx-site.conf | 20 ++++++------- conf/nginx.conf | 63 ++++++++++++++++++++-------------------- docs/versioning.md | 13 +++++++-- 6 files changed, 84 insertions(+), 77 deletions(-) diff --git a/Dockerfile b/Dockerfile index efda7e6d..fa652185 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.3.9-fpm-alpine3.10 +FROM php:7.4.2-fpm-alpine3.11 LABEL maintainer="Ric Harvey " @@ -49,14 +49,14 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ --with-http_auth_request_module \ --with-http_xslt_module=dynamic \ --with-http_image_filter_module=dynamic \ - --with-http_geoip_module=dynamic \ +# --with-http_geoip_module=dynamic \ --with-http_perl_module=dynamic \ --with-threads \ --with-stream \ --with-stream_ssl_module \ --with-stream_ssl_preread_module \ --with-stream_realip_module \ - --with-stream_geoip_module=dynamic \ +# --with-stream_geoip_module=dynamic \ --with-http_slice_module \ --with-mail \ --with-mail_ssl_module \ @@ -65,7 +65,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ --with-http_v2_module \ --add-module=/usr/src/ngx_devel_kit-$DEVEL_KIT_MODULE_VERSION \ --add-module=/usr/src/lua-nginx-module-$LUA_MODULE_VERSION \ - --add-module=/usr/src/ngx_http_geoip2_module-$GEOIP2_MODULE_VERSION \ +# --add-module=/usr/src/ngx_http_geoip2_module-$GEOIP2_MODULE_VERSION \ " \ && addgroup -S nginx \ && adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx \ @@ -82,7 +82,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ gnupg \ libxslt-dev \ gd-dev \ - geoip-dev \ + # geoip-dev \ libmaxminddb-dev \ perl-dev \ luajit-dev \ @@ -90,7 +90,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ && curl -fSL http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz.asc -o nginx.tar.gz.asc \ && curl -fSL https://github.com/simpl/ngx_devel_kit/archive/v$DEVEL_KIT_MODULE_VERSION.tar.gz -o ndk.tar.gz \ && curl -fSL https://github.com/openresty/lua-nginx-module/archive/v$LUA_MODULE_VERSION.tar.gz -o lua.tar.gz \ - && curl -fSL https://github.com/leev/ngx_http_geoip2_module/archive/$GEOIP2_MODULE_VERSION.tar.gz -o ngx_http_geoip2_module.tar.gz \ +# && curl -fSL https://github.com/leev/ngx_http_geoip2_module/archive/$GEOIP2_MODULE_VERSION.tar.gz -o ngx_http_geoip2_module.tar.gz \ && export GNUPGHOME="$(mktemp -d)" \ && found=''; \ for server in \ @@ -109,17 +109,17 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ && tar -zxC /usr/src -f nginx.tar.gz \ && tar -zxC /usr/src -f ndk.tar.gz \ && tar -zxC /usr/src -f lua.tar.gz \ - && tar -zxC /usr/src -f ngx_http_geoip2_module.tar.gz \ - && rm nginx.tar.gz ndk.tar.gz lua.tar.gz ngx_http_geoip2_module.tar.gz \ +# && tar -zxC /usr/src -f ngx_http_geoip2_module.tar.gz \ +# && rm nginx.tar.gz ndk.tar.gz lua.tar.gz ngx_http_geoip2_module.tar.gz \ && cd /usr/src/nginx-$NGINX_VERSION \ && ./configure $CONFIG --with-debug \ && make -j$(getconf _NPROCESSORS_ONLN) \ && mv objs/nginx objs/nginx-debug \ && mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so \ && mv objs/ngx_http_image_filter_module.so objs/ngx_http_image_filter_module-debug.so \ - && mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so \ +# && mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so \ && mv objs/ngx_http_perl_module.so objs/ngx_http_perl_module-debug.so \ - && mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so \ +# && mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so \ && ./configure $CONFIG \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ @@ -131,14 +131,14 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ && install -m755 objs/nginx-debug /usr/sbin/nginx-debug \ && install -m755 objs/ngx_http_xslt_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_xslt_filter_module-debug.so \ && install -m755 objs/ngx_http_image_filter_module-debug.so /usr/lib/nginx/modules/ngx_http_image_filter_module-debug.so \ - && install -m755 objs/ngx_http_geoip_module-debug.so /usr/lib/nginx/modules/ngx_http_geoip_module-debug.so \ +# && install -m755 objs/ngx_http_geoip_module-debug.so /usr/lib/nginx/modules/ngx_http_geoip_module-debug.so \ && install -m755 objs/ngx_http_perl_module-debug.so /usr/lib/nginx/modules/ngx_http_perl_module-debug.so \ - && install -m755 objs/ngx_stream_geoip_module-debug.so /usr/lib/nginx/modules/ngx_stream_geoip_module-debug.so \ +# && install -m755 objs/ngx_stream_geoip_module-debug.so /usr/lib/nginx/modules/ngx_stream_geoip_module-debug.so \ && ln -s ../../usr/lib/nginx/modules /etc/nginx/modules \ && strip /usr/sbin/nginx* \ && strip /usr/lib/nginx/modules/*.so \ && rm -rf /usr/src/nginx-$NGINX_VERSION \ - && rm -rf /usr/src/ngx_http_geoip2_module-$GEOIP2_MODULE_VERSION \ +# && rm -rf /usr/src/ngx_http_geoip2_module-$GEOIP2_MODULE_VERSION \ \ # Bring in gettext so we can get `envsubst`, then throw # the rest away. To do this, we need to install `gettext` @@ -200,14 +200,12 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo libjpeg-turbo-dev \ postgresql-dev && \ docker-php-ext-configure gd \ - --with-gd \ - --with-freetype-dir=/usr/include/ \ - --with-png-dir=/usr/include/ \ - --with-jpeg-dir=/usr/include/ && \ + --with-freetype \ + --with-jpeg && \ #curl iconv session #docker-php-ext-install pdo_mysql pdo_sqlite mysqli mcrypt gd exif intl xsl json soap dom zip opcache && \ docker-php-ext-install iconv pdo_mysql pdo_sqlite pgsql pdo_pgsql mysqli gd exif intl xsl json soap dom zip opcache && \ - pecl install xdebug-2.7.2 && \ + pecl install xdebug-2.9.2 && \ pecl install -o -f redis && \ echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini && \ docker-php-source delete && \ @@ -241,11 +239,12 @@ ADD conf/nginx-site.conf /etc/nginx/sites-available/default.conf ADD conf/nginx-site-ssl.conf /etc/nginx/sites-available/default-ssl.conf RUN ln -s /etc/nginx/sites-available/default.conf /etc/nginx/sites-enabled/default.conf +## disabled due to license changes (to fix in next release) # Add GeoLite2 databases (https://dev.maxmind.com/geoip/geoip2/geolite2/) -RUN curl -fSL http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz -o /etc/nginx/GeoLite2-City.mmdb.gz \ - && curl -fSL http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz -o /etc/nginx/GeoLite2-Country.mmdb.gz \ - && gunzip /etc/nginx/GeoLite2-City.mmdb.gz \ - && gunzip /etc/nginx/GeoLite2-Country.mmdb.gz +#RUN curl -fSL http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz -o /etc/nginx/GeoLite2-City.mmdb.gz \ +# && curl -fSL http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz -o /etc/nginx/GeoLite2-Country.mmdb.gz \ +# && gunzip /etc/nginx/GeoLite2-City.mmdb.gz \ +# && gunzip /etc/nginx/GeoLite2-Country.mmdb.gz # tweak php-fpm config RUN echo "cgi.fix_pathinfo=0" > ${php_vars} &&\ diff --git a/README.md b/README.md index 56523b80..9f472d2d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.8.2 | Master Branch |1.16.1 | 7.3.9 | 3.10 | +| latest/1.9.0 | Master Branch |1.16.1 | 7.4.2 | 3.11 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/conf/nginx-site-ssl.conf b/conf/nginx-site-ssl.conf index 13c286fa..0c2e0887 100644 --- a/conf/nginx-site-ssl.conf +++ b/conf/nginx-site-ssl.conf @@ -63,16 +63,16 @@ server { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_index index.php; - fastcgi_param GEOIP2_LONGITUDE $geoip2_data_longitude; - fastcgi_param GEOIP2_LATITUDE $geoip2_data_latitude; - fastcgi_param GEOIP2_CONTINENT_CODE $geoip2_data_continent_code; - fastcgi_param GEOIP2_CONTINENT_NAME $geoip2_data_continent_name; - fastcgi_param GEOIP2_COUNTRY_CODE $geoip2_data_country_code; - fastcgi_param GEOIP2_COUNTRY_NAME $geoip2_data_country_name; - fastcgi_param GEOIP2_STATE_CODE $geoip2_data_state_code; - fastcgi_param GEOIP2_STATE_NAME $geoip2_data_state_name; - fastcgi_param GEOIP2_CITY_NAME $geoip2_data_city_name; - fastcgi_param GEOIP2_POSTAL_CODE $geoip2_data_postal_code; +# fastcgi_param GEOIP2_LONGITUDE $geoip2_data_longitude; +# fastcgi_param GEOIP2_LATITUDE $geoip2_data_latitude; +# fastcgi_param GEOIP2_CONTINENT_CODE $geoip2_data_continent_code; +# fastcgi_param GEOIP2_CONTINENT_NAME $geoip2_data_continent_name; +# fastcgi_param GEOIP2_COUNTRY_CODE $geoip2_data_country_code; +# fastcgi_param GEOIP2_COUNTRY_NAME $geoip2_data_country_name; +# fastcgi_param GEOIP2_STATE_CODE $geoip2_data_state_code; +# fastcgi_param GEOIP2_STATE_NAME $geoip2_data_state_name; +# fastcgi_param GEOIP2_CITY_NAME $geoip2_data_city_name; +# fastcgi_param GEOIP2_POSTAL_CODE $geoip2_data_postal_code; include fastcgi_params; } diff --git a/conf/nginx-site.conf b/conf/nginx-site.conf index 728ba5b0..0b75de87 100644 --- a/conf/nginx-site.conf +++ b/conf/nginx-site.conf @@ -59,16 +59,16 @@ server { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_index index.php; - fastcgi_param GEOIP2_LONGITUDE $geoip2_data_longitude; - fastcgi_param GEOIP2_LATITUDE $geoip2_data_latitude; - fastcgi_param GEOIP2_CONTINENT_CODE $geoip2_data_continent_code; - fastcgi_param GEOIP2_CONTINENT_NAME $geoip2_data_continent_name; - fastcgi_param GEOIP2_COUNTRY_CODE $geoip2_data_country_code; - fastcgi_param GEOIP2_COUNTRY_NAME $geoip2_data_country_name; - fastcgi_param GEOIP2_STATE_CODE $geoip2_data_state_code; - fastcgi_param GEOIP2_STATE_NAME $geoip2_data_state_name; - fastcgi_param GEOIP2_CITY_NAME $geoip2_data_city_name; - fastcgi_param GEOIP2_POSTAL_CODE $geoip2_data_postal_code; +# fastcgi_param GEOIP2_LONGITUDE $geoip2_data_longitude; +# fastcgi_param GEOIP2_LATITUDE $geoip2_data_latitude; +# fastcgi_param GEOIP2_CONTINENT_CODE $geoip2_data_continent_code; +# fastcgi_param GEOIP2_CONTINENT_NAME $geoip2_data_continent_name; +# fastcgi_param GEOIP2_COUNTRY_CODE $geoip2_data_country_code; +# fastcgi_param GEOIP2_COUNTRY_NAME $geoip2_data_country_name; +# fastcgi_param GEOIP2_STATE_CODE $geoip2_data_state_code; +# fastcgi_param GEOIP2_STATE_NAME $geoip2_data_state_name; +# fastcgi_param GEOIP2_CITY_NAME $geoip2_data_city_name; +# fastcgi_param GEOIP2_POSTAL_CODE $geoip2_data_postal_code; include fastcgi_params; } diff --git a/conf/nginx.conf b/conf/nginx.conf index 2df88214..19f1b456 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -33,37 +33,38 @@ http { server_tokens off; #gzip on; - geoip2 /etc/nginx/GeoLite2-Country.mmdb { - auto_reload 1h; - - $geoip2_metadata_country_build metadata build_epoch; - - # populate the country - $geoip2_data_country_code source=$remote_addr country iso_code; - $geoip2_data_country_name source=$remote_addr country names en; - - # populate the continent - $geoip2_data_continent_code source=$remote_addr continent code; - $geoip2_data_continent_name source=$remote_addr continent names en; - } - - geoip2 /etc/nginx/GeoLite2-City.mmdb { - auto_reload 1h; - - # City name itself - $geoip2_data_city_name source=$remote_addr city names en; - - # Postal code will be an approximation, probably the first one in the list that covers an area - $geoip2_data_postal_code source=$remote_addr postal code; - - # State in code and long form - $geoip2_data_state_code source=$remote_addr subdivisions 0 iso_code; - $geoip2_data_state_name source=$remote_addr subdivisions 0 names en; - - # Lat and Lng - $geoip2_data_latitude source=$remote_addr location latitude; - $geoip2_data_longitude source=$remote_addr location longitude; - } +# Disabled due to license +# geoip2 /etc/nginx/GeoLite2-Country.mmdb { +# auto_reload 1h; +# +# $geoip2_metadata_country_build metadata build_epoch; +# +# # populate the country +# $geoip2_data_country_code source=$remote_addr country iso_code; +# $geoip2_data_country_name source=$remote_addr country names en; +# +# # populate the continent +# $geoip2_data_continent_code source=$remote_addr continent code; +# $geoip2_data_continent_name source=$remote_addr continent names en; +# } +# +# geoip2 /etc/nginx/GeoLite2-City.mmdb { +# auto_reload 1h; +# +# # City name itself +# $geoip2_data_city_name source=$remote_addr city names en; +# +# # Postal code will be an approximation, probably the first one in the list that covers an area +# $geoip2_data_postal_code source=$remote_addr postal code; +# +# # State in code and long form +# $geoip2_data_state_code source=$remote_addr subdivisions 0 iso_code; +# $geoip2_data_state_name source=$remote_addr subdivisions 0 names en; +# +# # Lat and Lng +# $geoip2_data_latitude source=$remote_addr location latitude; +# $geoip2_data_longitude source=$remote_addr location longitude; +# } include /etc/nginx/sites-enabled/*; } diff --git a/docs/versioning.md b/docs/versioning.md index 01728577..47c5c092 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -13,6 +13,16 @@ We will use the [semver](http://ricostacruz.com/cheatsheets/semver.html) style n The latest tag will always follow the master branch in git. the other versions will have releases attached. +#### PHP 7.4 + +| Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | Notes | +|-----|-------|-----|--------|--------|----------| +| 1.9.0 | 7.4.2 |1.16.1 | 3.11 | 0.3.13 | upgrade to PHP 7.4.2 | + +These tags will be created on GitLab and as tags in docker hub. + +### Unmaintained tags: + #### PHP 7.3 | Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | Notes | @@ -35,9 +45,6 @@ The latest tag will always follow the master branch in git. the other versions w | 1.8.1 | 7.3.9 |1.16.1 | 3.10 | 0.3.12 | started python upgrade | | 1.8.2 | 7.3.9 |1.16.1 | 3.10 | 0.3.13 | geoip2, catchall and xdebug.remote merges | -These tags will be created on GitLab and as tags in docker hub. - -### Unmaintained tags: #### PHP 7.2 | Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | From e0d5b4579747982c5a14be4f37defc53d553e385 Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 20 Apr 2020 15:56:13 +0100 Subject: [PATCH 89/90] Upgrade to php 7.4.5 --- Dockerfile | 2 +- README.md | 2 +- docs/versioning.md | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index fa652185..f3bbcd0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.4.2-fpm-alpine3.11 +FROM php:7.4.5-fpm-alpine3.11 LABEL maintainer="Ric Harvey " diff --git a/README.md b/README.md index 9f472d2d..60b36cc2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.9.0 | Master Branch |1.16.1 | 7.4.2 | 3.11 | +| latest/1.9.0 | Master Branch |1.16.1 | 7.4.5 | 3.11 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md) diff --git a/docs/versioning.md b/docs/versioning.md index 47c5c092..3724a588 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -18,6 +18,7 @@ The latest tag will always follow the master branch in git. the other versions w | Docker Tag | PHP Version | Nginx Version | Alpine Version | Container Scripts | Notes | |-----|-------|-----|--------|--------|----------| | 1.9.0 | 7.4.2 |1.16.1 | 3.11 | 0.3.13 | upgrade to PHP 7.4.2 | +| 1.9.1 | 7.4.5 |1.16.1 | 3.11 | 0.3.13 | upgrade to PHP 7.4.5 | These tags will be created on GitLab and as tags in docker hub. From 50afaef803f478e69e9ae1739b510646b770266c Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Mon, 20 Apr 2020 16:00:30 +0100 Subject: [PATCH 90/90] Fix readme [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 60b36cc2..f35accc0 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you have improvements or suggestions please open an issue or pull request on ### Versioning | Docker Tag | Git Release | Nginx Version | PHP Version | Alpine Version | |-----|-------|-----|--------|--------| -| latest/1.9.0 | Master Branch |1.16.1 | 7.4.5 | 3.11 | +| latest/1.9.1 | Master Branch |1.16.1 | 7.4.5 | 3.11 | For other tags please see: [versioning](https://gitlab.com/ric_harvey/nginx-php-fpm/blob/master/docs/versioning.md)