Skip to content

Commit

Permalink
Image updates and hostname examples (kaliop#33)
Browse files Browse the repository at this point in the history
* apache.yml image update

* nginx.yml image update

* docker-compose-template.yml and stack.sh solr image update

* Readme.md hostname examples
  • Loading branch information
David Sayre authored and supasteev0 committed Jul 12, 2018
1 parent 4a3a72a commit d4e9c18
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
8 changes: 8 additions & 0 deletions Readme.md
Expand Up @@ -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 :

Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-template.yml
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
6 changes: 5 additions & 1 deletion stack.sh
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
esac

0 comments on commit d4e9c18

Please sign in to comment.