diff options
-rw-r--r-- | docker/server/server.php | 7 |
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(); |