From 5ac76de4338d6e6f51d415d3f4c6b24e400c217d Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Tue, 18 Dec 2018 23:23:57 -0500 Subject: [PATCH] Bringing it up to standards, ready for master --- templates/WordPress/0/docker-compose.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/templates/WordPress/0/docker-compose.yml b/templates/WordPress/0/docker-compose.yml index 223b839..9a44587 100644 --- a/templates/WordPress/0/docker-compose.yml +++ b/templates/WordPress/0/docker-compose.yml @@ -10,7 +10,7 @@ services: WORDPRESS_DB_HOST: mysql WORDPRESS_DB_USER: wordpress_user WORDPRESS_DB_PASSWORD: ${DB_USER_PASS} - WORDPRESS_DB_NAME: wordpress + WORDPRESS_DB_NAME: wordpress # Will eventually rename this to "wordpress_db" labels: io.rancher.container.pull_image: always {{- if .Values.HOST_LABEL}} @@ -32,18 +32,22 @@ services: - mysql networks: - public-proxy + {{- if .Values.WEB_PORT}} ports: - "${WEB_PORT}:80" + {{- end}} restart: on-failure volumes: - - /RancherCattleData/${DATA_DIR}/Application:/var/www/html + - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system + - /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system + - /RancherCattle/${DATA_DIR}/Application:/var/www/html mysql: image: mysql:5 dns: - 1.1.1.1 - 1.0.0.1 environment: - MYSQL_DATABASE: wordpress + MYSQL_DATABASE: wordpress # Will eventually rename this to "wordpress_db" MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS} MYSQL_USER: wordpress_user MYSQL_PASSWORD: ${DB_USER_PASS} @@ -52,12 +56,18 @@ services: {{- if .Values.HOST_LABEL}} io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} {{- end}} + networks: + db-admin: + aliases: + - wordpress restart: on-failure volumes: - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system - /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system - - /RancherCattleData/${DATA_DIR}/Database:/var/lib/mysql + - /RancherCattle/${DATA_DIR}/Database:/var/lib/mysql networks: + db-admin: + external: true public-proxy: external: true \ No newline at end of file