From b52ea4e05bb45254120a5edd9038fb7c1fc78a4d Mon Sep 17 00:00:00 2001 From: Lucas Mirloup <97196064+lucasmirloup@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:29:39 +0200 Subject: [PATCH] feat(adminer): switch to Adminer Evo, pre-login to database servers --- .gitignore | 2 + database/adminer/adminer.yml | 29 +- database/adminer/index.php | 31 ++ .../le-phare-pre-login-to-databases.php | 21 + database/adminer/theme.css | 421 ------------------ 5 files changed, 72 insertions(+), 432 deletions(-) create mode 100644 database/adminer/index.php create mode 100644 database/adminer/plugins/le-phare-pre-login-to-databases.php delete mode 100644 database/adminer/theme.css diff --git a/.gitignore b/.gitignore index abba290..812a645 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ +.idea/ + **/*.override.yml .env diff --git a/database/adminer/adminer.yml b/database/adminer/adminer.yml index 552b7b5..07bde2d 100644 --- a/database/adminer/adminer.yml +++ b/database/adminer/adminer.yml @@ -1,17 +1,24 @@ services: + adminer_php: + 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 diff --git a/database/adminer/index.php b/database/adminer/index.php new file mode 100644 index 0000000..0f55678 --- /dev/null +++ b/database/adminer/index.php @@ -0,0 +1,31 @@ +