From d0c183b93c6fa48527f70e3193fcc21674b70e13 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 29 Jul 2026 14:15:54 +0100 Subject: [PATCH] fix(dev): point Adminer at the configured database Adminer was hardcoded to the mariadb host with MariaDB-only root credentials, so with MariaDB no longer starting by default the bundled UI opened onto a service that was not running. Follow _APP_DB_HOST/_APP_DB_ADAPTER/_APP_DB_USER/_APP_DB_PASS/ _APP_DB_SCHEMA instead, and pick the Adminer driver from the adapter -- "pgsql" for PostgreSQL, "server" for MySQL/MariaDB. Mongo primaries are served by mongo-express, which Adminer cannot talk to either way. Co-Authored-By: Claude Opus 5 (1M context) --- docker-compose.override.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 7aab6ab22d..25719a7096 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -400,10 +400,11 @@ services: - gateway environment: - ADMINER_DESIGN=pepa-linha - - ADMINER_DEFAULT_SERVER=mariadb - - ADMINER_DEFAULT_USERNAME=root - - ADMINER_DEFAULT_PASSWORD=rootsecretpassword - - ADMINER_DEFAULT_DB=appwrite + - ADMINER_DEFAULT_SERVER=${_APP_DB_HOST:-postgresql} + - ADMINER_DEFAULT_DRIVER=${_APP_DB_ADAPTER:-postgresql} + - ADMINER_DEFAULT_USERNAME=${_APP_DB_USER} + - ADMINER_DEFAULT_PASSWORD=${_APP_DB_PASS} + - ADMINER_DEFAULT_DB=${_APP_DB_SCHEMA} configs: - source: adminer-index.php target: /var/www/html/index.php @@ -556,7 +557,8 @@ configs: if(!count($$_GET)) { $$_POST['auth'] = [ 'server' => $$_ENV['ADMINER_DEFAULT_SERVER'], - 'driver' => 'server', /* seems to autodetect the driver from server settings */ + /* Adminer calls the MySQL/MariaDB driver "server". */ + 'driver' => $$_ENV['ADMINER_DEFAULT_DRIVER'] === 'postgresql' ? 'pgsql' : 'server', 'username' => $$_ENV['ADMINER_DEFAULT_USERNAME'], 'password' => $$_ENV['ADMINER_DEFAULT_PASSWORD'], 'db' => $$_ENV['ADMINER_DEFAULT_DB'],