mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
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:
1 parent
e47ecd5c37
commit
d0c183b93c
1 file changed
+7
-5
@@ -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'],
|
||||
|
||||
Reference in new issue
Block a user