From d4e9c18efef1531b91fc71b0cd161a246f0bdd16 Mon Sep 17 00:00:00 2001 From: David Sayre Date: Thu, 12 Jul 2018 03:06:19 -0400 Subject: [PATCH] Image updates and hostname examples (#33) * apache.yml image update * nginx.yml image update * docker-compose-template.yml and stack.sh solr image update * Readme.md hostname examples --- Readme.md | 8 ++++++++ apache.yml | 2 +- docker-compose-template.yml | 4 ++-- nginx.yml | 2 +- stack.sh | 6 +++++- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Readme.md b/Readme.md index 4aa367e..86492f9 100644 --- a/Readme.md +++ b/Readme.md @@ -215,6 +215,14 @@ This panel will give you access to some tools such as PHP info, Apache Info, Var To use hostname-based vhosts, you should edit the local hosts file of the computer you are using. All hostnames used to point to 127.0.0.1 will trigger the same Apache Vhost. +Hostname mappings are based on a combination of domain patterns, ports and volume mounts + +Examples for eZ Publish 5 'site' + + http://my.site.ezdev -> 001-dynamic-vhost-ez5.conf ENV=dev -> /var/www/%2/web -> /var/www/site/web + http://my.site2.ezdev -> 001-dynamic-vhost-ez5.conf ENV=dev -> /var/www/%2/web -> /var/www/site2/web + http://my.site.ezdev:82 -> 001-dynamic-vhost-ez5.conf ENV=demo -> /var/www/%2/web -> /var/www/site/web + Port 80 is mapped to haproxy server. By default, haproxy will server your pages directly through Apache, but you can choose whether you want to view your website via Varnish or not. To do this, you must send a specific header called `Backend` and set the desired value : diff --git a/apache.yml b/apache.yml index 91f7c94..9bb2d70 100644 --- a/apache.yml +++ b/apache.yml @@ -1,7 +1,7 @@ version: '2' services: apache: - image: klabs/apache_${DOCKER_PHP_VERSION} + image: klabs/apache:${DOCKER_PHP_VERSION} volumes: - ./config/apache/sites-available/001-dynamic-vhost-ez5.conf:/etc/apache2/sites-available/001-dynamic-vhost-ez5.conf - ./config/apache/sites-available/002-dynamic-vhost-ezplatform.conf:/etc/apache2/sites-available/002-dynamic-vhost-ezplatform.conf diff --git a/docker-compose-template.yml b/docker-compose-template.yml index fe4b125..bff5b75 100644 --- a/docker-compose-template.yml +++ b/docker-compose-template.yml @@ -27,7 +27,7 @@ services: - SYS_PTRACE cli: - image: klabs/cli_${DOCKER_PHP_VERSION} + image: klabs/php_cli:${DOCKER_PHP_VERSION} hostname: ${DOCKER_PROJECT_NAME}_cli container_name: cli privileged: true @@ -65,7 +65,7 @@ services: - SYS_PTRACE solr: - image: klabs/solr4 + image: klabs/solr:${DOCKER_SOLR_VERSION} hostname: ${DOCKER_PROJECT_NAME}_solr container_name: solr ports: diff --git a/nginx.yml b/nginx.yml index c5562ca..70fef8e 100644 --- a/nginx.yml +++ b/nginx.yml @@ -1,7 +1,7 @@ version: '2' services: nginx: - image: klabs/nginx_${DOCKER_PHP_VERSION} + image: klabs/nginx:${DOCKER_PHP_VERSION} volumes: - ./config/nginx/sites-enabled/:/etc/nginx/sites-enabled/ - ./config/nginx/environment_common:/etc/nginx/environment_common diff --git a/stack.sh b/stack.sh index 2771fda..3375ee3 100755 --- a/stack.sh +++ b/stack.sh @@ -205,6 +205,9 @@ buildDockerComposeConfigFileIfNeeded() { # Ask for custom solr conf folder path read -p "[?] Path to solr configuration folder [./config/solr]: " solr_conf_path solr_conf_path=${solr_conf_path:-./config/solr} + + # Solr tag hard coded for now.. + solr_image_tag="ezfind" # Save all env vars in a file that will be included at every call echo "# in this file we define all env variables used by docker-compose.yml" > $DOCKER_COMPOSE_CONFIG_FILE @@ -215,6 +218,7 @@ buildDockerComposeConfigFileIfNeeded() { echo "export DOCKER_SOLR_CONF_PATH=$solr_conf_path" >> $DOCKER_COMPOSE_CONFIG_FILE echo "export DOCKER_STORAGE_LOCAL_PATH=$storage_local_path" >> $DOCKER_COMPOSE_CONFIG_FILE echo "export DOCKER_STORAGE_MOUNT_POINT=/mnt/\$USER" >> $DOCKER_COMPOSE_CONFIG_FILE + echo "export DOCKER_SOLR_VERSION=$solr_image_tag" >> $DOCKER_COMPOSE_CONFIG_FILE #Configure PHP version configurePhpVersion @@ -300,4 +304,4 @@ case "$1" in # any other variation, let it go directly through to docker-compose $DOCKER_COMPOSE -p "$DOCKER_PROJECT_NAME" $@ -esac \ No newline at end of file +esac