From eb097b0a72ca2e113fbe3bf42bd372e6f0ea290f Mon Sep 17 00:00:00 2001 From: Mikhail Yarmoluk Date: Tue, 26 Mar 2019 16:04:13 +0300 Subject: [PATCH] Update docker server: remove jre Add new docker image based on server with jre Enable by default xdebug in dev server image Update images version in env and README --- README.md | 14 ++++++++++++-- docker/.env-default | 6 +++--- docker/Dockerfile-dev-server | 6 ++++-- docker/Dockerfile-server | 3 --- docker/Dockerfile-server-jre | 6 ++++++ docs/ENVIRONMENTS.md | 4 ++-- sample/.env-sample | 4 ++-- sample/.env-sample-prod | 2 +- 8 files changed, 30 insertions(+), 15 deletions(-) create mode 100755 docker/Dockerfile-server-jre diff --git a/README.md b/README.md index fc7919c..10fb7b7 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,16 @@ to the require section of your `composer.json` file. ## PhpStorm samples - [Deploy config](phpstorm/SAMPLE_DEPLOY_CONFIG.xml) + +## Latest docker images + - NGINX + - matthewpatell/universal-docker-nginx:3.5 + - SERVER + - matthewpatell/universal-docker-server:3.9 + - matthewpatell/universal-docker-server:3.9-dev + - matthewpatell/universal-docker-server:3.9-jre (with java) + - PHP-FPM: + - matthewpatell/universal-docker-server-php-fpm:3.8 **FEATURES** --- @@ -109,9 +119,9 @@ to the require section of your `composer.json` file. - with server images: - ```docker run --rm --interactive --volume $PWD:/app matthewpatell/universal-docker-server:3.8 bash -c 'cd /app && composer install --no-scripts'``` + ```docker run --rm --interactive --volume $PWD:/app matthewpatell/universal-docker-server:3.9 bash -c 'cd /app && composer install --no-scripts'``` - with server image and additional global packages: - ```docker run --rm --interactive --volume $PWD:/app matthewpatell/universal-docker-server:3.8 bash -c 'cd /app && composer global require "fxp/composer-asset-plugin:^1.4.2" && composer global require "hirak/prestissimo:~0.3.7" && composer install --no-scripts'``` + ```docker run --rm --interactive --volume $PWD:/app matthewpatell/universal-docker-server:3.9 bash -c 'cd /app && composer global require "fxp/composer-asset-plugin:^1.4.2" && composer global require "hirak/prestissimo:~0.3.7" && composer install --no-scripts'``` That's all. Check it. :) diff --git a/docker/.env-default b/docker/.env-default index b2cb4f3..3bd7b44 100755 --- a/docker/.env-default +++ b/docker/.env-default @@ -48,14 +48,14 @@ XDEBUG_CONFIG="default_enable=0 remote_host=172.18.0.1 remote_enable=0 profiler_ # IMAGES REPOSITORIES NGINX_REPOSITORY=matthewpatell/universal-docker-nginx:3.5 -SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.8-dev +SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.9-dev # For production environment: -#SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.8 +#SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.9 # For production environment with ngingx+php scaling #SERVER_REPOSITORY=matthewpatell/universal-docker-server-php-fpm:3.8 -#TERMINAL_REPOSITORY=matthewpatell/universal-docker-server:3.8 +#TERMINAL_REPOSITORY=matthewpatell/universal-docker-server:3.9 # DOMAINS #DOMAIN_API=api.sampledomain.com diff --git a/docker/Dockerfile-dev-server b/docker/Dockerfile-dev-server index 2d2c04d..82008fa 100755 --- a/docker/Dockerfile-dev-server +++ b/docker/Dockerfile-dev-server @@ -1,8 +1,10 @@ -FROM matthewpatell/universal-docker-server:3.8 +FROM matthewpatell/universal-docker-server:3.9 -# TODO: write script which will generate group of dockerfiles with same version +# RUN apt-get update RUN apt-get install -y \ php7.1-dev \ php7.1-phpdbg \ php-codesniffer + +RUN phpenmod xdebug diff --git a/docker/Dockerfile-server b/docker/Dockerfile-server index 35b6c04..b17075e 100755 --- a/docker/Dockerfile-server +++ b/docker/Dockerfile-server @@ -37,7 +37,4 @@ RUN apt-get update -y --fix-missing \ && apt-get install -y supervisor \ && mkdir -p /var/log/supervisord -# Install java -RUN apt-get install -y default-jre - CMD service php7.1-fpm start && supervisord -n diff --git a/docker/Dockerfile-server-jre b/docker/Dockerfile-server-jre new file mode 100755 index 0000000..f547b8b --- /dev/null +++ b/docker/Dockerfile-server-jre @@ -0,0 +1,6 @@ +FROM matthewpatell/universal-docker-server:3.9 + +# RUN apt-get update + +# Install java +RUN apt-get install -y default-jre diff --git a/docs/ENVIRONMENTS.md b/docs/ENVIRONMENTS.md index 154334b..1e816cd 100644 --- a/docs/ENVIRONMENTS.md +++ b/docs/ENVIRONMENTS.md @@ -45,8 +45,8 @@ Property | Values | Description ## Images env (service: all) Property | Values | Description ---------|--------|------------ -`NGINX_REPOSITORY`| `(string)` `Default: matthewpatell/universal-docker-nginx:3.2` | Nginx docker image -`SERVER_REPOSITORY`| `(string)` `Default: matthewpatell/universal-docker-server:3.8-dev` | Either server (or server dev) image in non-scalable configuration, or `matthewpatell/universal-docker-server-php-fpm` for scaling `nginx`+`php-fpm`. +`NGINX_REPOSITORY`| `(string)` `Default: matthewpatell/universal-docker-nginx:3.5` | Nginx docker image +`SERVER_REPOSITORY`| `(string)` `Default: matthewpatell/universal-docker-server:3.9-dev` | Either server (or server dev) image in non-scalable configuration, or `matthewpatell/universal-docker-server-php-fpm` for scaling `nginx`+`php-fpm`. `TERMINAL_REPOSITORY`| `(string)` `Default: none` | Static non-scalable docker image for ssh connection, cron, queue listener and etc. Use image: `matthewpatell/universal-docker-server`. ## Server env (service: server) diff --git a/sample/.env-sample b/sample/.env-sample index f326309..ba4c6ca 100644 --- a/sample/.env-sample +++ b/sample/.env-sample @@ -12,11 +12,11 @@ DOMAIN_COMMON=sample.io # IMAGES REPOSITORIES # For production environment: -#SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.8 +#SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.9 # For production environment with ngingx+php scaling #SERVER_REPOSITORY=matthewpatell/universal-docker-server-php-fpm:3.8 -#TERMINAL_REPOSITORY=matthewpatell/universal-docker-server:3.8 +#TERMINAL_REPOSITORY=matthewpatell/universal-docker-server:3.9 SERVICES="${SERVICES} -f docker/docker-compose.common.yml -f docker/docker-compose.local.yml" diff --git a/sample/.env-sample-prod b/sample/.env-sample-prod index c64a4fa..1292b7d 100644 --- a/sample/.env-sample-prod +++ b/sample/.env-sample-prod @@ -47,7 +47,7 @@ SSL_DOMAINS[0]="admin@sample.com :api.sample.com sample.com:" SERVICES="-f !!docker-compose.yml -f !!docker-compose.prod.yml -f docker/docker-compose.common.yml" # IMAGES (use this image if you are not going to do autoscaling) -SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.8 +SERVER_REPOSITORY=matthewpatell/universal-docker-server:3.9 # OTHER CONFIGS # https://github.com/settings/tokens