add env config

This commit is contained in:
lubiana 2025-06-27 23:44:10 +02:00
parent c5fa857464
commit d68e7f45b3
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
2 changed files with 21 additions and 1 deletions

View file

@ -6,4 +6,9 @@ use App\App;
require_once __DIR__ . '/../vendor/autoload.php'; require_once __DIR__ . '/../vendor/autoload.php';
new App('https://uuid.php.fail/')->run(); $base = getenv('BASE_URL');
if (!is_string($base) || $base === '') {
$base = 'https://uuid.php.fail/';
}
new App($base)->run();

15
uuid.container Normal file
View file

@ -0,0 +1,15 @@
[Unit]
Description=UUID
[Container]
Image=git.hannover.ccc.de/lubiana/uuid:latest
PublishPort=127.0.0.1:8001:8001
Environment=SERVER_NAME=:8001
Environment=BASE_URL=https://uuid.php.fail/
AutoUpdate=registry
[Service]
Restart=always
[Install]
WantedBy=default.target