add KMS_LOGLEVEL

This commit is contained in:
ElevenNotes
2023-08-31 00:27:16 +02:00
parent e3e770ede2
commit deb26f95fc
3 changed files with 7 additions and 4 deletions

View File

@@ -27,6 +27,7 @@ docker run --name kms \
| `KMS_LOCALE` | see Microsoft LICD specification | 1033 (en-US) |
| `KMS_ACTIVATIONINTERVAL` | Retry unsuccessful after N minutes | 120 (2 hours) |
| `KMS_RENEWALINTERVAL` | re-activation after N minutes | 259200 (180 days) |
| `KMS_LOGLEVEL` | CRITICAL, ERROR, WARNING, INFO, DEBUG, MININFO | INFO |
## Parent
* [python:3.7.10-alpine](https://hub.docker.com/layers/library/python/3.7.10-alpine/images/sha256-932f7a8769b07d1effc5a46cb1463948542a017e82350c93f56792bec08ff9dd?context=explore)

View File

@@ -16,7 +16,7 @@
mv /tmp/py-kms/py-kms /usr/local/bin;
# :: Header
FROM python:3.7.10-alpine
FROM python:3.11.5-alpine
ENV APP_ROOT=/kms
COPY --from=build /usr/local/bin/ /usr/local/bin

View File

@@ -4,6 +4,7 @@
if [ -z "${KMS_LOCALE}" ]; then KMS_LOCALE=1033; fi
if [ -z "${KMS_ACTIVATIONINTERVAL}" ]; then KMS_ACTIVATIONINTERVAL=120; fi
if [ -z "${KMS_RENEWALINTERVAL}" ]; then KMS_RENEWALINTERVAL=259200; fi
if [ -z "${KMS_LOGLEVEL}" ]; then KMS_LOGLEVEL="INFO"; fi
if [ -z "$1" ]; then
set -- "python3" \
@@ -16,10 +17,11 @@
-r ${KMS_RENEWALINTERVAL} \
-s /kms/var/kms.db \
-w RANDOM \
-V ERROR \
-F STDOUT \
-V ${KMS_LOGLEVEL} \
-F FILEOFF \
-t0 600 \
-t1 300
-t1 300 \
-y
fi
exec "$@"