summaryrefslogtreecommitdiff
path: root/docker/server
diff options
context:
space:
mode:
Diffstat (limited to 'docker/server')
-rw-r--r--docker/server/server.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/docker/server/server.php b/docker/server/server.php
index dee0cd8..f9bb22a 100644
--- a/docker/server/server.php
+++ b/docker/server/server.php
@@ -14,6 +14,11 @@ $server = new Server(
'0.0.0.0'
);
-$server->onRequest(new DocumentServer(__DIR__ . '/content'));
+$server->onRequest(new DocumentServer(
+ documentRoot: realpath($_ENV['SERVER_DOCUMENT_ROOT'] ?? './content'),
+ indexFile: $_ENV['SERVER_INDEX_FILE'] ?? 'index.gmi',
+ useDirectoryListing: boolval($_ENV['SERVER_USE_DIRECTORY_LISTING'] ?? false)
+));
+
$server->listen();