add DEBUG option

This commit is contained in:
ElevenNotes
2025-02-07 10:45:31 +01:00
parent fdfa93cda8
commit 33a59cfaa8
5 changed files with 13 additions and 8 deletions

View File

@@ -49,7 +49,7 @@ services:
- "var:/kms/var"
ports:
- "1688:1688/tcp"
restart: always
restart: "always"
kms-gui:
image: "11notes/kms-gui:latest"
container_name: "kms-gui"
@@ -59,7 +59,7 @@ services:
- "var:/kms/var"
ports:
- "8080:8080/tcp"
restart: always
restart: "always"
volumes:
var:
```
@@ -94,7 +94,7 @@ slmgr /ato
| Parameter | Value | Default |
| --- | --- | --- |
| `TZ` | [Time Zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) | |
| `DEBUG` | Show debug messages from image **not** app | |
| `DEBUG` | Will activate debug option for container image and app (if available) | |
| `KMS_IP` | localhost or 127.0.0.1 or a dedicated IP | 0.0.0.0 |
| `KMS_PORT` | any port > 1024 | 1688 |
| `KMS_LOCALE` | see Microsoft LICD specification | 1033 (en-US) |

View File

@@ -1,2 +1,2 @@
### 🪄 Features
* prepare base layer for GUI image
* add DEBUG option via enivornment variable DEBUG

View File

@@ -58,7 +58,6 @@
RUN set -ex; \
mkdir -p ${APP_ROOT}/var; \
ln -sf /dev/stdout /var/log/kms.log; \
pip3 install --no-cache-dir -r /opt/py-kms/requirements.txt --break-system-packages; \
pip3 install --no-cache-dir pytz --break-system-packages; \
apk del --no-network .build;

View File

@@ -9,7 +9,7 @@ services:
- "var:/kms/var"
ports:
- "1688:1688/tcp"
restart: always
restart: "always"
kms-gui:
image: "11notes/kms-gui:latest"
container_name: "kms-gui"
@@ -19,6 +19,6 @@ services:
- "var:/kms/var"
ports:
- "8080:8080/tcp"
restart: always
restart: "always"
volumes:
var:

View File

@@ -1,5 +1,11 @@
#!/bin/ash
if [ -z "${1}" ]; then
if [ ! -z "${DEBUG}" ]; then
KMS_LOGLEVEL="DEBUG"
eleven log debug "setting kms log level to DEBUG"
fi
cd /opt/py-kms
set -- "python3" \
pykms_Server.py \
@@ -12,7 +18,7 @@
-s /kms/var/kms.db \
-w RANDOM \
-V ${KMS_LOGLEVEL} \
-F /var/log/kms.log \
-F STDOUT \
-y
eleven log start