Skip to content

Commit 127ec18

Browse files
committed
Support BASE64 config input to match official image
1 parent a229bb5 commit 127ec18

File tree

1 file changed

+10
-2
lines changed
  • root/etc/s6-overlay/s6-rc.d/init-phpmyadmin-config

1 file changed

+10
-2
lines changed

root/etc/s6-overlay/s6-rc.d/init-phpmyadmin-config/run

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,19 @@ if [ ! -f /config/phpmyadmin/config.secret.inc.php ]; then
1212
EOT
1313
fi
1414

15-
if [ ! -f /config/phpmyadmin/config.user.inc.php ]; then
15+
if [[ -n "${PMA_CONFIG_BASE64}" ]]; then
16+
echo "${PMA_CONFIG_BASE64}" | base64 -d > /config/phpmyadmin/config.inc.php
17+
fi
18+
19+
if [[ -n "${PMA_USER_CONFIG_BASE64}" ]]; then
20+
echo "${PMA_USER_CONFIG_BASE64}" | base64 -d > /config/phpmyadmin/config.user.inc.php
21+
fi
22+
23+
if [[ ! -f /config/phpmyadmin/config.user.inc.php ]]; then
1624
touch /config/phpmyadmin/config.user.inc.php
1725
fi
1826

19-
if [ ! -f /config/phpmyadmin/config.inc.php ]; then
27+
if [[ ! -f /config/phpmyadmin/config.inc.php ]]; then
2028
cp /defaults/config.inc.php /config/phpmyadmin/config.inc.php
2129
fi
2230

0 commit comments

Comments
 (0)