From 325d974c0d41a7489d0c5ec64969e7b8e1069555 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Thu, 28 Nov 2024 11:11:05 +0100
Subject: [PATCH] add adminer

---
 lib/Commands/Compile.php | 6 +++++-
 web/assets/style.css     | 3 +++
 web/index.php            | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/lib/Commands/Compile.php b/lib/Commands/Compile.php
index 2dad46e..6682398 100644
--- a/lib/Commands/Compile.php
+++ b/lib/Commands/Compile.php
@@ -243,11 +243,15 @@ final class Compile extends Command
         $creator->addService('redis-server', 'redis:latest', [
             'container_name' => 'redis',
             'restart'        => 'always',
-            'ports'          => ['6379:6379'],
             'volumes'        => ['cache-data:/data'],
         ]);
         $creator->addVolume('cache-data');
 
+        $creator->addService('adminer', 'adminer', [
+            'restart' => 'always',
+            'ports'   => ['8044:8080'],
+        ]);
+
         return $creator->dump();
     }
 
diff --git a/web/assets/style.css b/web/assets/style.css
index 55ac767..b1667cb 100644
--- a/web/assets/style.css
+++ b/web/assets/style.css
@@ -35,6 +35,9 @@ body {
 .tabs a:focus {
     font-weight: bold;
 }
+.tabs .right {
+    float: right;
+}
 
 section {
     padding-top: 1.5em;
diff --git a/web/index.php b/web/index.php
index 9e36236..c9735a4 100644
--- a/web/index.php
+++ b/web/index.php
@@ -23,7 +23,7 @@ $log = new LogParser(__DIR__ . '/../logs/php/error.log');
             <a href="#logs">Logs</a>
         </span>
 
-        <span>
+        <span class="right">
             <a href="http://localhost:8044?username=root" target="_blank">
                 Adminer
             </a>
-- 
GitLab