From 4996c744ee1e5eba3723261228ec573147335cef Mon Sep 17 00:00:00 2001 From: Peter Kionga-Kamau Date: Sat, 16 Nov 2024 19:19:39 -0500 Subject: [PATCH] Update to use single-line array for networks --- templates/mariadb.json | 8 ++++---- templates/mariadb/docker-compose.yml | 3 +-- templates/mysql.json | 8 ++++---- templates/mysql/docker-compose.yml | 3 +-- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/templates/mariadb.json b/templates/mariadb.json index e10d7cb..c146012 100644 --- a/templates/mariadb.json +++ b/templates/mariadb.json @@ -57,10 +57,10 @@ "description": "Optional parameters to the mariadbd daemon such as `--skip-grant-tables` or `--sql_mode=NO_ENGINE_SUBSTITUTION`" }, { - "name": "MYSQL_NETWORK", - "label": "Docker Network", - "default": "mariadb", - "description": "Network to use for communication between containers (single name, multiple networks not supported)" + "name": "MYSQL_NETWORKS", + "label": "Docker Networks", + "default": "db, mariadb, mariadb_default", + "description": "Networks to use for communication between containers (comma-separated)" }, { "name": "MYSQL_ROOT_HOST", diff --git a/templates/mariadb/docker-compose.yml b/templates/mariadb/docker-compose.yml index 03274cf..f3fe553 100644 --- a/templates/mariadb/docker-compose.yml +++ b/templates/mariadb/docker-compose.yml @@ -12,8 +12,7 @@ services: - "${MYSQL_PORT:-3306}:3306" volumes: - ${MOUNT_ROOT:-/var/lib/portainer}/${CONTAINER_NAME:-mariadb}/data:/var/lib/mariadb - networks: - - ${MYSQL_NETWORK:-db} + networks: [ ${MYSQL_NETWORKS:-mariadb} ] command: > /bin/bash -c " if [ ! -f /docker-entrypoint-initdb.d/init.sql ]; then diff --git a/templates/mysql.json b/templates/mysql.json index d8a0182..bb5ec19 100644 --- a/templates/mysql.json +++ b/templates/mysql.json @@ -57,10 +57,10 @@ "description": "Optional parameters to the mysqld daemon such as `--skip-grant-tables` (safe mode) or `--sql_mode=NO_ENGINE_SUBSTITUTION` (for AWS RDS permission issues)" }, { - "name": "MYSQL_NETWORK", - "label": "Docker Network", - "default": "mysql", - "description": "Network to use for communication between containers (single name, multiple networks not supported)" + "name": "MYSQL_NETWORKS", + "label": "Docker Networks", + "default": "db, mysql, mysql_default", + "description": "Networks to use for communication between containers (comma-separated)" }, { "name": "MYSQL_ROOT_HOST", diff --git a/templates/mysql/docker-compose.yml b/templates/mysql/docker-compose.yml index f4c2ca2..2676820 100644 --- a/templates/mysql/docker-compose.yml +++ b/templates/mysql/docker-compose.yml @@ -11,8 +11,7 @@ services: - "${MYSQL_PORT:-3306}:3306" volumes: - ${MOUNT_ROOT:-/var/lib/portainer}/${CONTAINER_NAME:-mysql}/data:/var/lib/mysql - networks: - - ${MYSQL_NETWORK:-db} + networks: [ ${MYSQL_NETWORKS:-mysql} ] command: > /bin/bash -c " if [ ! -f /docker-entrypoint-initdb.d/init.sql ]; then