-
Notifications
You must be signed in to change notification settings - Fork 2k
POC: Introduce Debian Stretch with Nginx #821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Contains POC of nginx + php-fpm based on Debian Stretch Supports dynamic configuration for nginx.conf using bash script + sed. Nginx Perl & Lua modules doesn't allow to modify top level vars(user,pidfile). Reason for this PR - I'd like to introduce Nextcloud based on Nginx They use upstream apache-php image as a basic Image variant php:<version>-nginxFpm-stretch This image is based on Debian Stretch and Nginx. PHP contains support for FPM. Please review code, I look forward to your feedback This code doesn't contain code rejected in PRs: docker-library#818 docker-library#817 Image can be pulled using: docker.io/1john2/php:latest Signed-off-by: Malanik Jan <malanik.jan@gmail.com>
What is the motivation behind bundling nginx with php-fpm in the same container? |
I'd like to introduce nexdcloud with nginx.
They use php "official images" as a BASE
Br Jan
…On Tue, Apr 30, 2019, 10:18 PM Michał Brzuchalski ***@***.***> wrote:
What it the motivation behind bundling nginx with php-fpm in the same
container?
What about scalability?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#821 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABBHJXZ7W6RVHTBG2E4GK2TPTCSSHANCNFSM4HJO22VA>
.
|
While the work is admirable, we do not have container images with an un-managed background process in the official-images. We also don't usually have multiple processes in one container that would require a init-like system (supervisord, runit, s6, etc). Our recommendation for nginx with php-fpm is as follows:
|
This PR introduce POC of Nextcloud based on Nginx web server with php-fpm in separated container. Basic installation with SQLite and few operations in web gui were tested. Updated Dockerfile-debian.template (base for apache image) is used in current version. - It's not possible to use nginx:latest as a base image - Image will not be alligned. - It's not possible to use "php:%%PHP_VERSION%%-%%VARIANT%%-stretch" it generates 7.3-nginx-stretch tag which is invalid(non-existing image) for upstream base PHP Potential solutions of this problem: - Custom tags in Debian template and generate Nginx from current Dockerfile-debian.template with customizations - PR to PHP upstream with Nginx+php-fpm in one container was rejected - it's not scalable: docker-library/php#821 - Change of way how we generate tags/Dockerfiles PR for PHP upstream with Nginx+php-fpm in one New files were introduced: - Dockerfile-nginx.template - nginx-foreground + simulates behavior of apache2-foreground cmd - 16.0/nginx/Dockerfile + generated from template Dockerfile-nginx.template - nextcloud.confx + Nginx vhost configuration - start_net.sh (temporary) + Helper script to create user-defined network for Docker + '--link' option for docker create is obsolete and we need communication between fpm and nginx container - start_ncd.sh (temporary) + Helper script to handle nextcloud container - start_fpm.sh (temporary) + Helper script to handle fpm container Updated files: - set -x added to all shell scripts for easier troubleshooting (temporary) - Dockerfile-debian.template - changes required to generate Nginx container until permanent fix will be done - update.sh + New variant introduced + Number of builded variant is limited for simplified CI. - .travis.yml (temporary) + Upload to private repository for testing purposes - docker-entrypoint.sh + Recognizes new argument for entrypoint - nginx-foreground Be careful during review, github recognizes removed files for 15.0 release as renamed to 16.0/nginx variant Motivation: - I have openvz based VPS where only old Docker 1.10 is supported. - Apache(in nextcloud container) in combination Nginx as a reverse proxy for multiple vhosts doesn't work correctly Signed-off-by: Malanik Jan <malanik.jan@gmail.com>
This PR introduce POC of Nextcloud based on Nginx web server with php-fpm in separated container. Basic installation with SQLite and few operations in web gui were tested. Updated Dockerfile-debian.template (base for apache image) is used in current version. - It's not possible to use nginx:latest as a base image - Image will not be alligned. - It's not possible to use "php:%%PHP_VERSION%%-%%VARIANT%%-stretch" it generates 7.3-nginx-stretch tag which is invalid(non-existing image) for upstream base PHP Potential solutions of this problem: - Custom tags in Debian template and generate Nginx from current Dockerfile-debian.template with customizations - PR to PHP upstream with Nginx+php-fpm in one container was rejected - it's not scalable: docker-library/php#821 - Change of way how we generate tags/Dockerfiles PR for PHP upstream with Nginx+php-fpm in one New files were introduced: - Dockerfile-nginx.template - nginx-foreground + simulates behavior of apache2-foreground cmd - 16.0/nginx/Dockerfile + generated from template Dockerfile-nginx.template - nextcloud.confx + Nginx vhost configuration - start_net.sh (temporary) + Helper script to create user-defined network for Docker + '--link' option for docker create is obsolete and we need communication between fpm and nginx container - start_ncd.sh (temporary) + Helper script to handle nextcloud container - start_fpm.sh (temporary) + Helper script to handle fpm container Updated files: - set -x added to all shell scripts for easier troubleshooting (temporary) - Dockerfile-debian.template - changes required to generate Nginx container until permanent fix will be done - update.sh + New variant introduced + Number of builded variant is limited for simplified CI. - .travis.yml (temporary) + Upload to private repository for testing purposes - docker-entrypoint.sh + Recognizes new argument for entrypoint - nginx-foreground Be careful during review, github recognizes removed files for 15.0 release as renamed to 16.0/nginx variant Motivation: - I have openvz based VPS where only old Docker 1.10 is supported. - Apache(in nextcloud container) in combination Nginx as a reverse proxy for multiple vhosts doesn't work correctly Signed-off-by: Malanik Jan <malanik.jan@gmail.com>
This PR introduce POC of Nextcloud based on Nginx web server with php-fpm in separated container. Basic installation with SQLite and few operations in web gui were tested. Updated Dockerfile-debian.template (base for apache image) is used in current version. - It's not possible to use nginx:latest as a base image - Image will not be alligned. - It's not possible to use "php:%%PHP_VERSION%%-%%VARIANT%%-stretch" it generates 7.3-nginx-stretch tag which is invalid(non-existing image) for upstream base PHP Potential solutions of this problem: - Custom tags in Debian template and generate Nginx from current Dockerfile-debian.template with customizations - PR to PHP upstream with Nginx+php-fpm in one container was rejected - it's not scalable: docker-library/php#821 - Change of way how we generate tags/Dockerfiles PR for PHP upstream with Nginx+php-fpm in one New files were introduced: - Dockerfile-nginx.template - nginx-foreground + simulates behavior of apache2-foreground cmd - 16.0/nginx/Dockerfile + generated from template Dockerfile-nginx.template - nextcloud.confx + Nginx vhost configuration - start_net.sh (temporary) + Helper script to create user-defined network for Docker + '--link' option for docker create is obsolete and we need communication between fpm and nginx container - start_ncd.sh (temporary) + Helper script to handle nextcloud container - start_fpm.sh (temporary) + Helper script to handle fpm container - Dockerfile + /Dockerfile for verification purposes Updated files: - set -x added to all shell scripts for easier troubleshooting (temporary) - Dockerfile-debian.template - changes required to generate Nginx container until permanent fix will be done - update.sh + New variant introduced + Number of builded variant is limited for simplified CI. - .travis.yml (temporary) + Upload to private repository for testing purposes - docker-entrypoint.sh + Recognizes new argument for entrypoint - nginx-foreground Be careful during review, github recognizes removed files for 15.0 release as renamed to 16.0/nginx variant Motivation: - I have openvz based VPS where only old Docker 1.10 is supported. - Apache(in nextcloud container) in combination Nginx as a reverse proxy for multiple vhosts doesn't work correctly Signed-off-by: Malanik Jan <malanik.jan@gmail.com>
This PR introduce POC of Nextcloud based on Nginx web server with php-fpm in separated container. Basic installation with SQLite and few operations in web gui were tested. Updated Dockerfile-debian.template (base for apache image) is used in current version. - It's not possible to use nginx:latest as a base image - Image will not be alligned. - It's not possible to use "php:%%PHP_VERSION%%-%%VARIANT%%-stretch" it generates 7.3-nginx-stretch tag which is invalid(non-existing image) for upstream base PHP Potential solutions of this problem: - Custom tags in Debian template and generate Nginx from current Dockerfile-debian.template with customizations - PR to PHP upstream with Nginx+php-fpm in one container was rejected - it's not scalable: docker-library/php#821 - Change of way how we generate tags/Dockerfiles PR for PHP upstream with Nginx+php-fpm in one New files were introduced: - Dockerfile-nginx.template - nginx-foreground + simulates behavior of apache2-foreground cmd - 16.0/nginx/Dockerfile + generated from template Dockerfile-nginx.template - nextcloud.confx + Nginx vhost configuration - start_net.sh (temporary) + Helper script to create user-defined network for Docker + '--link' option for docker create is obsolete and we need communication between fpm and nginx container - start_ncd.sh (temporary) + Helper script to handle nextcloud container - start_fpm.sh (temporary) + Helper script to handle fpm container - Dockerfile + /Dockerfile for verification purposes Updated files: - set -x added to all shell scripts for easier troubleshooting (temporary) - Dockerfile-debian.template - changes required to generate Nginx container until permanent fix will be done - update.sh + New variant introduced + Number of builded variant is limited for simplified CI. - .travis.yml (temporary) + Upload to private repository for testing purposes - docker-entrypoint.sh + Recognizes new argument for entrypoint - nginx-foreground Be careful during review, github recognizes removed files for 15.0 release as renamed to 16.0/nginx variant Motivation: - I have openvz based VPS where only old Docker 1.10 is supported. - Apache(in nextcloud container) in combination Nginx as a reverse proxy for multiple vhosts doesn't work correctly Image pull link: docker pull malanik.guru:443/nextcloud:apache-20190508 docker pull malanik.guru:443/nextcloud:fpm-20190508 Github link: Deployment notes: - Clone source code - Create user-defined network for Docker - Start fpm container - Start nginx container
This PR introduce POC of Nextcloud based on Nginx web server with php-fpm in separated container. Basic installation with SQLite and few operations in web gui were tested. Updated Dockerfile-debian.template (base for apache image) is used in current version. - It's not possible to use nginx:latest as a base image - Image will not be alligned. - It's not possible to use "php:%%PHP_VERSION%%-%%VARIANT%%-stretch" it generates 7.3-nginx-stretch tag which is invalid(non-existing image) for upstream base PHP Potential solutions of this problem: - Custom tags in Debian template and generate Nginx from current Dockerfile-debian.template with customizations - PR to PHP upstream with Nginx+php-fpm in one container was rejected - it's not scalable: docker-library/php#821 - Change of way how we generate tags/Dockerfiles PR for PHP upstream with Nginx+php-fpm in one New files were introduced: - Dockerfile-nginx.template - nginx-foreground + simulates behavior of apache2-foreground cmd - 16.0/nginx/Dockerfile + generated from template Dockerfile-nginx.template - nextcloud.confx + Nginx vhost configuration - start_net.sh (temporary) + Helper script to create user-defined network for Docker + '--link' option for docker create is obsolete and we need communication between fpm and nginx container - start_ncd.sh (temporary) + Helper script to handle nextcloud container - start_fpm.sh (temporary) + Helper script to handle fpm container - Dockerfile + /Dockerfile for verification purposes Updated files: - set -x added to all shell scripts for easier troubleshooting (temporary) - Dockerfile-debian.template - changes required to generate Nginx container until permanent fix will be done - update.sh + New variant introduced + Number of builded variant is limited for simplified CI. - .travis.yml (temporary) + Upload to private repository for testing purposes - docker-entrypoint.sh + Recognizes new argument for entrypoint - nginx-foreground Be careful during review, github recognizes removed files for 15.0 release as renamed to 16.0/nginx variant Motivation: - I have openvz based VPS where only old Docker 1.10 is supported. - Apache(in nextcloud container) in combination Nginx as a reverse proxy for multiple vhosts doesn't work correctly Image pull link: docker pull malanik.guru:443/nextcloud:apache-20190508 docker pull malanik.guru:443/nextcloud:fpm-20190508 Github link: Deployment notes: - Clone source code - Create user-defined network for Docker - Start fpm container - Start nginx container
This PR introduce POC of Nextcloud based on Nginx web server with php-fpm in separated container. Basic installation with SQLite and few operations in web gui were tested. Updated Dockerfile-debian.template (base for apache image) is used in current version. - It's not possible to use nginx:latest as a base image - Image will not be alligned. - It's not possible to use "php:%%PHP_VERSION%%-%%VARIANT%%-stretch" it generates 7.3-nginx-stretch tag which is invalid(non-existing image) for upstream base PHP Potential solutions of this problem: - Custom tags in Debian template and generate Nginx from current Dockerfile-debian.template with customizations - PR to PHP upstream with Nginx+php-fpm in one container was rejected - it's not scalable: docker-library/php#821 - Change of way how we generate tags/Dockerfiles PR for PHP upstream with Nginx+php-fpm in one New files were introduced: - Dockerfile-nginx.template - nginx-foreground + simulates behavior of apache2-foreground cmd - 16.0/nginx/Dockerfile + generated from template Dockerfile-nginx.template - nextcloud.confx + Nginx vhost configuration - start_net.sh (temporary) + Helper script to create user-defined network for Docker + '--link' option for docker create is obsolete and we need communication between fpm and nginx container - start_container.sh (temporary) + Helper script to handle containers - Dockerfile + /Dockerfile for verification purposes Updated files: - set -x added to all shell scripts for easier troubleshooting (temporary) - Dockerfile-debian.template - changes required to generate Nginx container until permanent fix will be done - update.sh + New variant introduced + Number of builded variant is limited for simplified CI. - .travis.yml (temporary) + Upload to private repository for testing purposes - docker-entrypoint.sh + Recognizes new argument for entrypoint - nginx-foreground Be careful during review, github recognizes removed files for 15.0 release as renamed to 16.0/nginx variant Motivation: - I have openvz based VPS where only old Docker 1.10 is supported. - Apache(in nextcloud container) in combination Nginx as a reverse proxy for multiple vhosts doesn't work correctly Image pull link: docker pull malanik.guru:443/nextcloud:apache-20190508 docker pull malanik.guru:443/nextcloud:fpm-20190508 Github link: Deployment notes: - Clone source code - Create user-defined network for Docker - Start fpm container - Start nginx container
This PR introduce POC of Nextcloud based on Nginx web server with php-fpm in separated container. Basic installation with SQLite and few operations in web gui were tested. Updated Dockerfile-debian.template (base for apache image) is used in current version. - It's not possible to use nginx:latest as a base image - Image will not be alligned. - It's not possible to use "php:%%PHP_VERSION%%-%%VARIANT%%-stretch" it generates 7.3-nginx-stretch tag which is invalid(non-existing image) for upstream base PHP Potential solutions of this problem: - Custom tags in Debian template and generate Nginx from current Dockerfile-debian.template with customizations - PR to PHP upstream with Nginx+php-fpm in one container was rejected - it's not scalable: docker-library/php#821 - Change of way how we generate tags/Dockerfiles PR for PHP upstream with Nginx+php-fpm in one New files were introduced: - Dockerfile-nginx.template - nginx-foreground + simulates behavior of apache2-foreground cmd - 16.0/nginx/Dockerfile + generated from template Dockerfile-nginx.template - nextcloud.confx + Nginx vhost configuration - start_net.sh (temporary) + Helper script to create user-defined network for Docker + '--link' option for docker create is obsolete and we need communication between fpm and nginx container - start_container.sh (temporary) + Helper script to handle containers - Dockerfile + /Dockerfile for verification purposes Updated files: - set -x added to all shell scripts for easier troubleshooting (temporary) - Dockerfile-debian.template - changes required to generate Nginx container until permanent fix will be done - update.sh + New variant introduced + Number of builded variant is limited for simplified CI. - .travis.yml (temporary) + Upload to private repository for testing purposes - docker-entrypoint.sh + Recognizes new argument for entrypoint - nginx-foreground Be careful during review, github recognizes removed files for 15.0 release as renamed to 16.0/nginx variant Motivation: - I have openvz based VPS where only old Docker 1.10 is supported. - Apache(in nextcloud container) in combination Nginx as a reverse proxy for multiple vhosts doesn't work correctly Image pull link: docker pull malanik.guru:443/nextcloud:apache-20190508 docker pull malanik.guru:443/nextcloud:fpm-20190508 Github link: Deployment notes: - Clone source code - Create user-defined network for Docker - Start fpm container - Start nginx container
This PR introduce POC of Nextcloud based on Nginx web server with php-fpm in separated container. Basic installation with SQLite and few operations in web gui were tested. Updated Dockerfile-debian.template (base for apache image) is used in current version. - It's not possible to use nginx:latest as a base image - Image will not be alligned. - It's not possible to use "php:%%PHP_VERSION%%-%%VARIANT%%-stretch" it generates 7.3-nginx-stretch tag which is invalid(non-existing image) for upstream base PHP Potential solutions of this problem: - Custom tags in Debian template and generate Nginx from current Dockerfile-debian.template with customizations - PR to PHP upstream with Nginx+php-fpm in one container was rejected - it's not scalable: docker-library/php#821 - Change of way how we generate tags/Dockerfiles PR for PHP upstream with Nginx+php-fpm in one New files were introduced: - Dockerfile-nginx.template - nginx-foreground + simulates behavior of apache2-foreground cmd - 16.0/nginx/Dockerfile + generated from template Dockerfile-nginx.template - nextcloud.confx + Nginx vhost configuration - start_net.sh (temporary) + Helper script to create user-defined network for Docker + '--link' option for docker create is obsolete and we need communication between fpm and nginx container - start_container.sh (temporary) + Helper script to handle containers - Dockerfile + /Dockerfile for verification purposes Updated files: - set -x added to all shell scripts for easier troubleshooting (temporary) - Dockerfile-debian.template - changes required to generate Nginx container until permanent fix will be done - update.sh + New variant introduced + Number of builded variant is limited for simplified CI. - .travis.yml (temporary) + Upload to private repository for testing purposes - docker-entrypoint.sh + Recognizes new argument for entrypoint - nginx-foreground Be careful during review, github recognizes removed files for 15.0 release as renamed to 16.0/nginx variant Motivation: - I have openvz based VPS where only old Docker 1.10 is supported. - Apache(in nextcloud container) in combination Nginx as a reverse proxy for multiple vhosts doesn't work correctly Image pull link: docker pull malanik.guru:443/nextcloud:apache-20190508 docker pull malanik.guru:443/nextcloud:fpm-20190508 Github link: Deployment notes: - Clone source code - Create user-defined network for Docker - Start fpm container - Start nginx container
This PR introduce POC of Nextcloud based on Nginx web server with php-fpm in separated container. Basic installation with SQLite and few operations in web gui were tested. Updated Dockerfile-debian.template (base for apache image) is used in current version. - It's not possible to use nginx:latest as a base image - Image will not be alligned. - It's not possible to use "php:%%PHP_VERSION%%-%%VARIANT%%-stretch" it generates 7.3-nginx-stretch tag which is invalid(non-existing image) for upstream base PHP Potential solutions of this problem: - Custom tags in Debian template and generate Nginx from current Dockerfile-debian.template with customizations - PR to PHP upstream with Nginx+php-fpm in one container was rejected - it's not scalable: docker-library/php#821 - Change of way how we generate tags/Dockerfiles PR for PHP upstream with Nginx+php-fpm in one New files were introduced: - Dockerfile-nginx.template - nginx-foreground + simulates behavior of apache2-foreground cmd - 16.0/nginx/Dockerfile + generated from template Dockerfile-nginx.template - nextcloud.confx + Nginx vhost configuration - start_net.sh (temporary) + Helper script to create user-defined network for Docker + '--link' option for docker create is obsolete and we need communication between fpm and nginx container - start_container.sh (temporary) + Helper script to handle containers - Dockerfile + /Dockerfile for verification purposes Updated files: - set -x added to all shell scripts for easier troubleshooting (temporary) - Dockerfile-debian.template - changes required to generate Nginx container until permanent fix will be done - update.sh + New variant introduced + Number of builded variant is limited for simplified CI. - .travis.yml (temporary) + Upload to private repository for testing purposes - docker-entrypoint.sh + Recognizes new argument for entrypoint - nginx-foreground Be careful during review, github recognizes removed files for 15.0 release as renamed to 16.0/nginx variant Motivation: - I have openvz based VPS where only old Docker 1.10 is supported. - Apache(in nextcloud container) in combination Nginx as a reverse proxy for multiple vhosts doesn't work correctly Image pull link: docker pull malanik.guru:443/nextcloud:apache-20190508 docker pull malanik.guru:443/nextcloud:fpm-20190508 Github link: Deployment notes: - Clone source code - Create user-defined network for Docker - Start fpm container - Start nginx container
Contains POC of nginx + php-fpm based on Debian Stretch
Supports dynamic configuration for nginx.conf using bash script + sed.
Nginx Perl & Lua modules doesn't allow to modify top level vars(user,pidfile).
Reason for this PR - I'd like to introduce Nextcloud based on Nginx
They use upstream apache-php image as a basic
Image variant
php:-nginxFpm-stretch
This image is based on Debian Stretch and Nginx.
PHP contains support for FPM.
Please review code, I look forward to your feedback
This code doesn't contain code rejected in PRs:
#818
#817
Image can be pulled using: docker.io/1john2/php:latest
Signed-off-by: Malanik Jan malanik.jan@gmail.com