Skip to content

Commit

Permalink
Merge pull request #125 from crazy-max/skip-ssl-global
Browse files Browse the repository at this point in the history
use global conf to skip ssl for mysql client
  • Loading branch information
crazy-max authored Jan 4, 2025
2 parents 6168603 + 4a35646 commit 3e96055
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ linux/arm64
* `DB_PREFIX`: MySQL database prefix (default `flarum_`)
* `DB_NOPREFIX`: Enforce no prefix for the MySQL database (default `false`)
* `DB_TIMEOUT`: Time in seconds after which we stop trying to reach the MySQL server (useful for clusters, default `60`)
* `DB_SKIP_SSL`: Skip SSL connection to MySQL server (default `true`)

> [!NOTE]
> `DB_USER_FILE` and `DB_PASSWORD_FILE` can be used to fill in the value from a
Expand Down
4 changes: 0 additions & 4 deletions rootfs/etc/cont-init.d/03-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ DB_USER=${DB_USER:-flarum}
DB_PREFIX=${DB_PREFIX:-flarum_}
DB_NOPREFIX=${DB_NOPREFIX:-false}
DB_TIMEOUT=${DB_TIMEOUT:-60}
DB_SKIP_SSL=${DB_SKIP_SSL:-true}

# Timezone
echo "Setting timezone to ${TZ}..."
Expand Down Expand Up @@ -127,9 +126,6 @@ if [ -z "$DB_PASSWORD" ]; then
exit 1
fi
dbcmd="mariadb -h ${DB_HOST} -P ${DB_PORT} -u "${DB_USER}" "-p${DB_PASSWORD}""
if [ "$DB_SKIP_SSL" = "true" ]; then
dbcmd="$dbcmd --skip-ssl"
fi

echo "Waiting ${DB_TIMEOUT}s for database to be ready..."
counter=1
Expand Down
2 changes: 2 additions & 0 deletions rootfs/etc/my.cnf.d/skip-ssl.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[client]
skip-ssl = true

0 comments on commit 3e96055

Please sign in to comment.