Skip to content

Commit

Permalink
Update to use single-line array for networks
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Kionga-Kamau committed Nov 17, 2024
1 parent e80828e commit 4996c74
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
8 changes: 4 additions & 4 deletions templates/mariadb.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions templates/mariadb/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions templates/mysql.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions templates/mysql/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4996c74

Please sign in to comment.