-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(adminer): switch to Adminer Evo, pre-login to database servers
- Loading branch information
1 parent
4a4126b
commit e52cbd2
Showing
5 changed files
with
73 additions
and
432 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
.idea/ | ||
|
||
**/*.override.yml | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
services: | ||
adminer_php: | ||
restart: unless-stopped | ||
image: lephare/adminerevo | ||
volumes: | ||
- "./database/adminer/index.php:/var/www/adminer/index.php:ro" | ||
- "./database/adminer/plugins:/var/www/adminer/plugins:ro" | ||
networks: | ||
- private | ||
|
||
adminer: | ||
restart: always | ||
image: adminer | ||
restart: unless-stopped | ||
image: lephare/apache:2.4 | ||
volumes_from: | ||
- adminer_php:ro | ||
labels: | ||
caddy: adminer.${DOCKER_HOST_SUFFIX:-local} | ||
caddy.tls: internal | ||
caddy.reverse_proxy: "{{upstreams 8080}}" | ||
caddy.reverse_proxy: "{{ upstreams }}" | ||
environment: | ||
DOCUMENT_ROOT: /var/www/adminer | ||
PHP_CONTAINER_NAME: adminer_php | ||
networks: | ||
public: | ||
private: | ||
healthcheck: | ||
test: ["CMD", "php", "-r", "@file_get_contents('http://localhost:8080') or exit(1);"] | ||
interval: 10s | ||
timeout: 5s | ||
retries: 5 | ||
start_period: 30s | ||
- public | ||
- private |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
function adminer_object() | ||
{ | ||
// required to run any plugin | ||
include_once "./plugin.php"; | ||
|
||
// autoloader | ||
foreach (glob("plugins/*.php") as $filename) { | ||
include_once "./$filename"; | ||
} | ||
|
||
// enable extra drivers just by including them | ||
//~ include "./plugins/drivers/simpledb.php"; | ||
|
||
$plugins = array( | ||
// specify enabled plugins here | ||
new LePharePluginPreLoginToDatabases(), | ||
); | ||
|
||
/* It is possible to combine customization and plugins: | ||
class AdminerCustomization extends AdminerPlugin { | ||
} | ||
return new AdminerCustomization($plugins); | ||
*/ | ||
|
||
return new AdminerPlugin($plugins); | ||
} | ||
|
||
// include original Adminer or Adminer Editor | ||
include "./adminer.php"; |
21 changes: 21 additions & 0 deletions
21
database/adminer/plugins/le-phare-pre-login-to-databases.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
/** Pre-login to Le Phare database servers */ | ||
class LePharePluginPreLoginToDatabases | ||
{ | ||
function __construct() | ||
{ | ||
set_password('server', 'mysql_5', 'root', 'root'); | ||
|
||
set_password('server', 'mariadb_10', 'root', 'root'); | ||
|
||
set_password('pgsql', 'pgsql_9', 'postgres', 'root'); | ||
set_password('pgsql', 'pgsql_10', 'postgres', 'root'); | ||
set_password('pgsql', 'pgsql_11', 'postgres', 'root'); | ||
set_password('pgsql', 'pgsql_12', 'postgres', 'root'); | ||
set_password('pgsql', 'pgsql_13', 'postgres', 'root'); | ||
set_password('pgsql', 'pgsql_14', 'postgres', 'root'); | ||
set_password('pgsql', 'pgsql_15', 'postgres', 'root'); | ||
set_password('pgsql', 'pgsql_16', 'postgres', 'root'); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.