diff --git a/Dockerfile b/Dockerfile index e1c80cd..593bcb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,4 +34,4 @@ RUN apk add --no-cache nginx php8 php8-fpm php8-iconv php8-pcntl COPY --from=asset /asset/ / EXPOSE 1688/tcp 1689/tcp WORKDIR /kms-server/ -CMD ["php", "main.php"] +ENTRYPOINT ["php", "main.php"] diff --git a/main.php b/main.php index fe2230d..6932346 100644 --- a/main.php +++ b/main.php @@ -6,6 +6,10 @@ require_once './src/Daemon.php'; require_once './src/Logger.php'; require_once './src/Process.php'; +if (in_array('--debug', $argv)) { // debug mode + logging::$logLevel = logging::DEBUG; +} + $nginx = array( 'name' => 'nginx', 'command' => ['/usr/sbin/nginx'], diff --git a/src/Logger.php b/src/Logger.php index 1129ca4..62f782c 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -1,6 +1,6 @@ '37m', // white