From 37ed904f1a588de09993d76ddeee8447bcc9a767 Mon Sep 17 00:00:00 2001 From: hchs Date: Thu, 9 Mar 2017 10:26:47 +0800 Subject: [PATCH 01/10] add vhost example --- apache2/Dockerfile | 2 ++ apache2/sites/.gitignore | 3 +++ apache2/sites/default.apache.conf | 16 ++++++++++++++++ apache2/sites/sample.conf.example | 16 ++++++++++++++++ apache2/vhost.conf | 1 + docker-compose.yml | 1 + 6 files changed, 39 insertions(+) create mode 100644 apache2/sites/.gitignore create mode 100644 apache2/sites/default.apache.conf create mode 100644 apache2/sites/sample.conf.example create mode 100644 apache2/vhost.conf diff --git a/apache2/Dockerfile b/apache2/Dockerfile index 569ba9f..09cc63e 100644 --- a/apache2/Dockerfile +++ b/apache2/Dockerfile @@ -12,6 +12,8 @@ EXPOSE 80 443 WORKDIR /var/www/public +ADD vhost.conf /etc/apache2/sites-enabled/vhost.conf + ENTRYPOINT ["/opt/docker/bin/entrypoint.sh"] CMD ["supervisord"] diff --git a/apache2/sites/.gitignore b/apache2/sites/.gitignore new file mode 100644 index 0000000..f1f9322 --- /dev/null +++ b/apache2/sites/.gitignore @@ -0,0 +1,3 @@ +*.conf +!default.conf +!default.apache.conf diff --git a/apache2/sites/default.apache.conf b/apache2/sites/default.apache.conf new file mode 100644 index 0000000..2d15daf --- /dev/null +++ b/apache2/sites/default.apache.conf @@ -0,0 +1,16 @@ + + ServerName laradock.dev + DocumentRoot /var/www/html/ + Options Indexes FollowSymLinks + + + AllowOverride All + + Allow from all + + = 2.4> + Require all granted + + + + diff --git a/apache2/sites/sample.conf.example b/apache2/sites/sample.conf.example new file mode 100644 index 0000000..48a132e --- /dev/null +++ b/apache2/sites/sample.conf.example @@ -0,0 +1,16 @@ + + ServerName sample.dev + DocumentRoot /var/www/sample/public/ + Options Indexes FollowSymLinks + + + AllowOverride All + + Allow from all + + = 2.4> + Require all granted + + + + diff --git a/apache2/vhost.conf b/apache2/vhost.conf new file mode 100644 index 0000000..2352bf8 --- /dev/null +++ b/apache2/vhost.conf @@ -0,0 +1 @@ +Include /etc/apache2/sites-available/*.conf diff --git a/docker-compose.yml b/docker-compose.yml index 283d777..38a5209 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -104,6 +104,7 @@ services: - applications volumes: - ./logs/apache2:/var/log/apache2 + - ./apache2/sites:/etc/apache2/sites-available ports: - "80:80" - "443:443" From d505871faffe89e35a7e89eeb2b2b6069c962202 Mon Sep 17 00:00:00 2001 From: Ignacio Cabrera Date: Tue, 14 Mar 2017 11:05:22 -0300 Subject: [PATCH 02/10] Adding php-worker for Laravel --- php-worker/Dockerfile | 39 +++++++++++++++++++++++++++++++++++++ php-worker/supervisord.conf | 9 +++++++++ 2 files changed, 48 insertions(+) create mode 100644 php-worker/Dockerfile create mode 100644 php-worker/supervisord.conf diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile new file mode 100644 index 0000000..c588b3d --- /dev/null +++ b/php-worker/Dockerfile @@ -0,0 +1,39 @@ +# +#-------------------------------------------------------------------------- +# Image Setup +#-------------------------------------------------------------------------- +# +# To take a look at the'php-worker' base Image, visit its DockerHub page +# https://hub.docker.com/r/nielsvdoorn/laravel-supervisor/ +# + +FROM nielsvdoorn/laravel-supervisor + +# +#-------------------------------------------------------------------------- +# Optional Supervisord Configuration +#-------------------------------------------------------------------------- +# +# Modify the ./supervisor.conf file to match your App's requirements. +# Make sure you rebuild your container with every change. +# +COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf + +# +#-------------------------------------------------------------------------- +# Optional Software's Installation +#-------------------------------------------------------------------------- +# +# If you need to modify this image, feel free to do it right here. +# + # -- Your awesome modifications go here -- # + + +# +#-------------------------------------------------------------------------- +# Final Touch +#-------------------------------------------------------------------------- +# + +RUN rm -r /var/lib/apt/lists/* +WORKDIR /etc/supervisor/conf.d/supervisord.conf \ No newline at end of file diff --git a/php-worker/supervisord.conf b/php-worker/supervisord.conf new file mode 100644 index 0000000..7815675 --- /dev/null +++ b/php-worker/supervisord.conf @@ -0,0 +1,9 @@ +[supervisord] +nodaemon=true +[program:laravel-worker] +process_name=%(program_name)s_%(process_num)02d +command=php /var/www/laravel/artisan queue:work --sleep=3 --tries=3 --daemon +autostart=true +autorestart=true +numprocs=8 +redirect_stderr=true \ No newline at end of file From cbd3cf7c20f25d058d9f11d7daa03d5210a8a9c0 Mon Sep 17 00:00:00 2001 From: Ignacio Cabrera Date: Tue, 14 Mar 2017 11:06:45 -0300 Subject: [PATCH 03/10] Adding php-worker container to docker-compose --- docker-compose.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 283d777..10eee55 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -74,6 +74,15 @@ services: environment: # IMPORTANT: Set the Remote Interpreter entry matching name to `laravel` - PHP_IDE_CONFIG=serverName=laravel + +### PHP Worker Container ################################# + php-worker: + build: + context: ./php-worker + volumes: + - ../:/var/www/laravel + links: + - workspace ### Nginx Server Container ################################## From 528b60eb17afc4b69c85d863ca1d7cbb61beb678 Mon Sep 17 00:00:00 2001 From: Ignacio Cabrera Date: Thu, 16 Mar 2017 21:03:04 -0300 Subject: [PATCH 04/10] fixing Volumes and Workdir --- docker-compose.yml | 4 ++-- php-worker/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 10eee55..ee6606b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -79,8 +79,8 @@ services: php-worker: build: context: ./php-worker - volumes: - - ../:/var/www/laravel + volumes_from: + - applications links: - workspace diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index c588b3d..13c6d95 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -36,4 +36,4 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf # RUN rm -r /var/lib/apt/lists/* -WORKDIR /etc/supervisor/conf.d/supervisord.conf \ No newline at end of file +WORKDIR /etc/supervisor/conf.d/ From c6e393f5cea3b28d7b366b2c9121c3ed734a1bff Mon Sep 17 00:00:00 2001 From: Max Mekenya Date: Fri, 17 Mar 2017 10:32:04 +1000 Subject: [PATCH 05/10] Update Dockerfile-71 We have already 7.1 image builded. + intl and ghostscript support https://github.com/laradock/laradock/pull/672 https://github.com/laradock/laradock/pull/680 --- php-fpm/Dockerfile-71 | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index 065a32f..001816c 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -10,7 +10,7 @@ # https://hub.docker.com/r/laradock/php-fpm/tags/ # -FROM laradock/php-fpm:7.1--0.0 # placeholder. Need change after new image would be built. +FROM laradock/php-fpm:7.1--1.3 MAINTAINER Mahmoud Zalt @@ -140,6 +140,32 @@ RUN if [ ${CODEIGNITER} = true ]; then \ docker-php-ext-install tokenizer \ ;fi +##################################### +# Human Language and Character Encoding Support: +##################################### + +ARG INTL=false +RUN if [ ${INTL} = true ]; then \ + # Install intl and requirements + apt-get install -y zlib1g-dev libicu-dev g++ && \ + docker-php-ext-configure intl && \ + docker-php-ext-install intl \ +;fi + +##################################### +# GHOSTSCRIPT: +##################################### + +ARG GHOSTSCRIPT=false +RUN if [ ${GHOSTSCRIPT} = true ]; then \ + # Install the ghostscript extension + # for PDF editing + apt-get -y update \ + && apt-get install -y \ + poppler-utils \ + ghostscript \ +;fi + # #-------------------------------------------------------------------------- # Final Touch From f2805bca529507f945378fc23559d9b6f031423c Mon Sep 17 00:00:00 2001 From: Ignacio Cabrera Date: Thu, 16 Mar 2017 22:21:26 -0300 Subject: [PATCH 06/10] Update docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 48b860e..4e046c2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -70,7 +70,7 @@ services: extra_hosts: - "dockerhost:${DOCKER_HOST_IP}" environment: - - PHP_IDE_CONFIG=serverName=laravel + - PHP_IDE_CONFIG=${PHP_IDE_CONFIG} ### PHP Worker Container ##################################### php-worker: From 08086be4c5e3762f4d020e4d01d18870094ebda8 Mon Sep 17 00:00:00 2001 From: jefhar Date: Thu, 16 Mar 2017 23:26:54 -0700 Subject: [PATCH 07/10] PHP_FPM_INSTALL_INTL env-example added PHP_FPM_INSTALL_INTL=false to PHP_FPM_INSTALL_INTL=false --- env-example | 1 + 1 file changed, 1 insertion(+) diff --git a/env-example b/env-example index d13094e..eaaaaec 100644 --- a/env-example +++ b/env-example @@ -45,6 +45,7 @@ PHP_FPM_INSTALL_EXIF=false PHP_FPM_INSTALL_AEROSPIKE_EXTENSION=false PHP_FPM_INSTALL_MYSQLI=false PHP_FPM_INSTALL_TOKENIZER=false +PHP_FPM_INSTALL_INTL=false ### NGINX Container NGINX_HOST_HTTP_PORT=80 From 8b4901ce579f5cb68be0bf1cf399aa5e2918a2dd Mon Sep 17 00:00:00 2001 From: jefhar Date: Thu, 16 Mar 2017 23:28:29 -0700 Subject: [PATCH 08/10] Closed if Closed if [] ;fi in Human Language and Character Encoding Support: --- php-fpm/Dockerfile-70 | 1 + 1 file changed, 1 insertion(+) diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index 6482952..5649563 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -202,6 +202,7 @@ RUN if [ ${INSTALL_INTL} = true ]; then \ apt-get install -y zlib1g-dev libicu-dev g++ && \ docker-php-ext-configure intl && \ docker-php-ext-install intl \ +;fi ##################################### # GHOSTSCRIPT: From 8e897253818a4ae0d2264194c906230aa16d0be2 Mon Sep 17 00:00:00 2001 From: picospuch Date: Fri, 17 Mar 2017 16:37:42 +0800 Subject: [PATCH 09/10] Update env-example --- env-example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env-example b/env-example index d13094e..463cddf 100644 --- a/env-example +++ b/env-example @@ -48,7 +48,7 @@ PHP_FPM_INSTALL_TOKENIZER=false ### NGINX Container NGINX_HOST_HTTP_PORT=80 -NGINX_HOST_HTTPS_PORT=433 +NGINX_HOST_HTTPS_PORT=443 NGINX_HOST_LOG_PATH=./logs/nginx/ NGINX_SITES_PATH=./nginx/sites/ From cee9de7ed1a9140e18541783a67aea9e7317007f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20T=C3=A1boas?= Date: Fri, 17 Mar 2017 10:10:32 +0100 Subject: [PATCH 10/10] Fix Dockerfile-70 Add ;fi to end if INSTALL_INTL block --- php-fpm/Dockerfile-70 | 1 + 1 file changed, 1 insertion(+) diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index 6482952..5649563 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -202,6 +202,7 @@ RUN if [ ${INSTALL_INTL} = true ]; then \ apt-get install -y zlib1g-dev libicu-dev g++ && \ docker-php-ext-configure intl && \ docker-php-ext-install intl \ +;fi ##################################### # GHOSTSCRIPT: