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) <noreply@anthropic.com>
This commit is contained in:
loks0nandClaude Opus 5 committed 2026-07-29 14:15:54 +01:00
1 parent e47ecd5c37
commit d0c183b93c
1 file changed
+7 -5
+7 -5
View File
@@ -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'],