91 Commits

Author SHA1 Message Date
github-actions[bot]
6fd38bbd74 github-actions[bot]: update README.md 2025-05-02 09:48:27 +00:00
github-actions[bot]
d4cf5e9f24 github-actions[bot]: update README.md 2025-05-02 08:37:48 +00:00
ElevenNotes
d094fe1357 Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-05-02 10:26:44 +02:00
ElevenNotes
ab655ef97c [fix] invalidate cache 2025-05-02 10:26:36 +02:00
github-actions[bot]
915cc5bcdc github-actions[bot]: update README.md 2025-05-02 08:23:31 +00:00
ElevenNotes
f90bd43a16 [fix] upgrade all BUT pip 2025-05-02 10:14:51 +02:00
ElevenNotes
3a98954378 [fix] upgrade all BUT pip 2025-05-02 10:14:05 +02:00
ElevenNotes
9a990477d8 [fix] UID/GID defaults 2025-05-02 09:57:23 +02:00
ElevenNotes
63b38064e4 [fix] system packages 2025-05-02 09:56:34 +02:00
ElevenNotes
b17c50ef99 [fix] no cache-dir 2025-05-02 09:49:52 +02:00
ElevenNotes
131f719f0d [fix] upgrade 2025-05-02 09:40:47 +02:00
ElevenNotes
7f1f8b4096 Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-05-02 09:04:02 +02:00
ElevenNotes
c16f825747 [feature] adjust to new workflow 2025-05-02 09:03:54 +02:00
ElevenNotes
6022fb0269 [feature] new workflow 2025-05-02 09:03:40 +02:00
ElevenNotes
73f27eb071 [upgrade] to latest workflow 2025-05-02 09:03:26 +02:00
ElevenNotes
dbcb40d456 [breaking] change port to 3000 to streamline app ports 2025-05-02 09:03:15 +02:00
ElevenNotes
02a2d538c8 [breaking] change port to 3000 to streamline app ports 2025-05-02 09:03:03 +02:00
ElevenNotes
779e562963 [cut] latest and stable (because there is none) 2025-05-02 09:02:48 +02:00
github-actions[bot]
543c345d80 auto update README.md 2025-03-10 11:02:37 +00:00
ElevenNotes
d1ac93f4b5 Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-03-10 11:59:20 +01:00
ElevenNotes
405a874533 [feature] add products page again after tailwind fix 2025-03-10 11:59:10 +01:00
github-actions[bot]
b45314d58f auto update README.md 2025-03-07 23:48:17 +00:00
ElevenNotes
2f59f8c6e2 Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-03-08 00:46:10 +01:00
ElevenNotes
03f63033c5 [fix] forgot APP_PREFIX & APP_SUFFIX in dynamic build args 2025-03-08 00:45:28 +01:00
github-actions[bot]
15d93c9643 auto update README.md 2025-03-07 11:14:14 +00:00
ElevenNotes
7637bf2c3d Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-03-07 12:09:25 +01:00
ElevenNotes
145c6a1d82 [fix] semver.length 2025-03-07 12:09:14 +01:00
github-actions[bot]
4221216db4 auto update README.md 2025-03-07 11:07:09 +00:00
github-actions[bot]
95fbe08011 auto update README.md 2025-03-07 10:58:09 +00:00
ElevenNotes
e34127b4c7 Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-03-07 11:55:29 +01:00
ElevenNotes
75a3d5d474 [upgrade] docker.yml workflow to new javascript version 2025-03-07 11:55:20 +01:00
github-actions[bot]
24a59b471e auto update README.md 2025-02-21 06:22:45 +00:00
ElevenNotes
bf755ecf0d [cut] drop commit fix for fork of pykms-frontend 2025-02-21 07:17:01 +01:00
ElevenNotes
2ef047319a Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-02-21 07:15:59 +01:00
ElevenNotes
d608769727 [comment] different ico than custom-icon style 2025-02-21 07:15:49 +01:00
github-actions[bot]
72d8d9c55c auto update README.md 2025-02-21 06:05:47 +00:00
ElevenNotes
d20153c545 Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-02-21 07:03:12 +01:00
ElevenNotes
ce91a1f421 [upgrade] bump pykms-frontend to 103935b 2025-02-21 07:02:58 +01:00
github-actions[bot]
dbce137fb8 auto update README.md 2025-02-21 05:59:45 +00:00
ElevenNotes
4aed569709 Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-02-21 06:53:10 +01:00
ElevenNotes
8b1457602d [feature] APP_NO_CACHE to invalidate cache for styles 2025-02-21 06:53:02 +01:00
github-actions[bot]
847ff77077 auto update README.md 2025-02-21 05:50:53 +00:00
ElevenNotes
cfbf6347c2 Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-02-21 06:45:57 +01:00
ElevenNotes
7f4a0b5cf4 [cut] products 2025-02-21 06:45:47 +01:00
ElevenNotes
c5bbc99c24 [cut] footer, since it serves no needed value 2025-02-21 06:44:24 +01:00
github-actions[bot]
971ba4ffe4 auto update README.md 2025-02-20 14:18:47 +00:00
ElevenNotes
1ba6193786 [comment] simpler styles path 2025-02-20 15:16:12 +01:00
ElevenNotes
026ad460f2 [fix] wrong checkout for README.md 2025-02-20 14:57:55 +01:00
ElevenNotes
3fe5ab5da7 [feature] add favicon.ico 2025-02-20 14:57:24 +01:00
ElevenNotes
a04dad1275 Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-02-20 14:00:12 +01:00
ElevenNotes
cabd8fd912 [feature] add client.machineIp to UI and static tailwind library 2025-02-20 13:59:56 +01:00
github-actions[bot]
87b0cb92ea update README.md 2025-02-20 05:57:37 +00:00
ElevenNotes
0ad0cd2171 Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-02-20 01:01:35 +01:00
ElevenNotes
ac6cf03ce6 [feature] new release workflow (no more static RELEASE.md) 2025-02-20 01:01:27 +01:00
github-actions[bot]
5426f03cc4 update README.md 2025-02-19 10:24:45 +00:00
ElevenNotes
d668e52b2f Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-02-19 11:22:26 +01:00
ElevenNotes
717231ea90 test run-name for dispatch 2025-02-19 11:22:17 +01:00
github-actions[bot]
3afec57439 update README.md 2025-02-19 10:19:23 +00:00
ElevenNotes
497b70ea6a Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-02-19 11:17:12 +01:00
ElevenNotes
3e9b1a5950 continue-on-error: true 2025-02-19 11:17:04 +01:00
github-actions[bot]
6e690e96c3 update README.md 2025-02-19 10:11:48 +00:00
ElevenNotes
f5249c6f6b add client IP to SQlite database 2025-02-19 11:10:08 +01:00
ElevenNotes
78c5cb68db Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-02-19 11:06:04 +01:00
ElevenNotes
0cc9bf714a add client.machineIp 2025-02-19 11:05:54 +01:00
github-actions[bot]
33f68a3b09 update README.md 2025-02-19 09:55:44 +00:00
ElevenNotes
23ea81077b Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-02-19 09:46:20 +01:00
ElevenNotes
4309e308b3 11notes/action-docker-readme@v1 2025-02-19 09:46:12 +01:00
github-actions[bot]
36885bc9e5 update README.md 2025-02-19 08:15:39 +00:00
ElevenNotes
65ab5cf49f Merge branch 'master' of https://github.com/11notes/docker-kms-gui 2025-02-19 09:01:15 +01:00
ElevenNotes
60d6c33d69 fix default 2025-02-19 09:01:08 +01:00
github-actions[bot]
e555a3b1e3 update README.md 2025-02-19 00:14:17 +00:00
ElevenNotes
d161bab2d8 new README workflow 2025-02-19 00:42:14 +01:00
ElevenNotes
7754585854 add KMS_GUI_STYLE 2025-02-17 10:57:55 +01:00
ElevenNotes
2bbc9e2653 fix markdown issue 2025-02-14 11:29:36 +01:00
ElevenNotes
a955ccb9b1 new workflow 2025-02-14 11:23:52 +01:00
ElevenNotes
3822e0e370 update readme 2025-02-12 22:45:24 +01:00
ElevenNotes
c06ececada add tags based release again 2025-02-12 22:14:25 +01:00
ElevenNotes
c8b7e470e4 typos everywhere ... 2025-02-12 22:12:36 +01:00
ElevenNotes
eea805e13a add unraid support 2025-02-12 21:59:34 +01:00
ElevenNotes
6909b2fc29 add unraid 2025-02-12 21:54:26 +01:00
ElevenNotes
caa7a8a1e6 new .json format 2025-02-12 07:20:59 +01:00
ElevenNotes
dcfb8ba91e workflow issues 2025-02-10 12:06:32 +01:00
ElevenNotes
129c21344c release issues 2025-02-10 11:56:51 +01:00
ElevenNotes
303774a72c release issues 2025-02-10 11:44:48 +01:00
ElevenNotes
23892c6d0b switch to next branch of kms base image 2025-02-10 10:50:54 +01:00
ElevenNotes
58f22ed34c add DEBUG option 2025-02-07 10:49:24 +01:00
ElevenNotes
63d616adfd chown /opt/py-kms 2025-02-07 10:28:35 +01:00
ElevenNotes
b6f69b4860 remove truncation from clients.html 2025-02-07 10:26:29 +01:00
ElevenNotes
ed3ea34868 add img 2025-02-07 09:24:53 +01:00
ElevenNotes
11cf777dbd new base layer 11notes/kms:${APP_VERSION} 2025-02-07 09:17:38 +01:00
ElevenNotes
70680a384b new base layer 11notes/kms:${APP_VERSION} 2025-02-07 09:17:05 +01:00
20 changed files with 744 additions and 1233 deletions

View File

@@ -1,4 +1,5 @@
.git*
*.md
img/
maintain/
project*

3
.gitattributes vendored
View File

@@ -1,2 +1 @@
# Auto detect text files and perform LF normalization
* text=auto
* text=auto

View File

@@ -1,137 +1,424 @@
name: create and publish docker image
name: docker
run-name: ${{ inputs.run-name }}
on:
workflow_dispatch:
push:
tags:
- 'v*'
inputs:
run-name:
description: 'set run-name for workflow (multiple calls)'
type: string
required: false
default: 'docker'
env:
DOCKER_USERNAME: 11notes
runs-on:
description: 'set runs-on for workflow (github or selfhosted)'
type: string
required: false
default: 'ubuntu-22.04'
build:
description: 'set WORKFLOW_BUILD'
required: false
default: 'true'
release:
description: 'set WORKFLOW_GITHUB_RELEASE'
required: false
default: 'false'
readme:
description: 'set WORKFLOW_GITHUB_README'
required: false
default: 'false'
etc:
description: 'base64 encoded json string'
required: false
jobs:
build-and-push-image:
runs-on: ubuntu-latest
docker:
runs-on: ${{ inputs.runs-on }}
timeout-minutes: 1440
services:
registry:
image: registry:2
ports:
- 5000:5000
permissions:
actions: read
contents: write
packages: write
security-events: write
steps:
- name: init / checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: init / .json to env
uses: rgarcia-phi/json-to-variables@9835d537368468c4e4de5254dc3efeadda183793
with:
filename: '.json'
ref: ${{ github.ref_name }}
fetch-depth: 0
- name: init / setup environment
run: |
: # set default arch if not set
echo "IMAGE_ARCH=${json_arch:-linux/amd64,linux/arm64}" >> $GITHUB_ENV
: # create tags for semver, stable and other shenanigans
export LOCAL_SHA=$(git rev-parse --short HEAD)
export LOCAL_SEMVER_MAJOR=$(awk -F. '{ print $1 }' <<< ${json_version})
export LOCAL_SEMVER_MINOR=$(awk -F. '{ print $2 }' <<< ${json_version})
export LOCAL_SEMVER_PATCH=$(awk -F. '{ print $3 }' <<< ${json_version})
export LOCAL_TAGS="${json_image}:latest"
if [ ! -z ${LOCAL_SEMVER_MAJOR} ]; then LOCAL_TAGS="${LOCAL_TAGS},${json_image}:${LOCAL_SEMVER_MAJOR}"; fi
if [ ! -z ${LOCAL_SEMVER_MINOR} ]; then LOCAL_TAGS="${LOCAL_TAGS},${json_image}:${LOCAL_SEMVER_MAJOR}.${LOCAL_SEMVER_MINOR}"; fi
if [ ! -z ${LOCAL_SEMVER_PATCH} ]; then LOCAL_TAGS="${LOCAL_TAGS},${json_image}:${LOCAL_SEMVER_MAJOR}.${LOCAL_SEMVER_MINOR}.${LOCAL_SEMVER_PATCH}"; fi
if echo "${LOCAL_TAGS}" | grep -q "${json_stable}" ; then LOCAL_TAGS="${LOCAL_TAGS},${json_image}:stable"; fi
if [ ! -z ${json_tags} ]; then SPECIAL_LOCAL_TAGS=$(echo ${json_tags} | sed 's/,/ /g'); for LOCAL_TAG in ${json_tags}; do LOCAL_TAGS="${LOCAL_TAGS},${json_image}:${LOCAL_TAG}"; done; fi
LOCAL_TAGS="${LOCAL_TAGS},${json_image}:${LOCAL_SHA}"
echo "IMAGE_TAGS=${LOCAL_TAGS}" >> $GITHUB_ENV
: # if for whatever reason UID/GID must be changed at build time
echo "IMAGE_UID=${json_uid:-1000}" >> $GITHUB_ENV
echo "IMAGE_GID=${json_gid:-1000}" >> $GITHUB_ENV
- name: docker / login to hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
uses: actions/github-script@62c3794a3eb6788d9a2a72b219504732c0c9a298
with:
username: ${{ env.DOCKER_USERNAME }}
script: |
const { existsSync, readFileSync } = require('node:fs');
const { resolve } = require('node:path');
const { inspect } = require('node:util');
const { Buffer } = require('node:buffer');
const inputs = `${{ toJSON(github.event.inputs) }}`;
const opt = {input:{}, dot:{}};
try{
if(inputs.length > 0){
opt.input = JSON.parse(inputs);
if(opt.input?.etc){
opt.input.etc = JSON.parse(Buffer.from(opt.input.etc, 'base64').toString('ascii'));
}
}
}catch(e){
core.warning('could not parse github.event.inputs');
}
try{
const path = resolve('.json');
if(existsSync(path)){
try{
opt.dot = JSON.parse(readFileSync(path).toString());
}catch(e){
throw new Error('could not parse .json');
}
}else{
throw new Error('.json does not exist');
}
}catch(e){
core.setFailed(e);
}
core.info(inspect(opt, {showHidden:false, depth:null, colors:true}));
const docker = {
image:{
name:opt.dot.image,
arch:(opt.dot.arch || 'linux/amd64,linux/arm64'),
prefix:((opt.input?.etc?.semverprefix) ? `${opt.input?.etc?.semverprefix}-` : ''),
suffix:((opt.input?.etc?.semversuffix) ? `-${opt.input?.etc?.semversuffix}` : ''),
description:(opt.dot?.readme?.description || ''),
tags:[],
},
app:{
image:opt.dot.image,
name:opt.dot.name,
version:(opt.input?.etc?.version || opt.dot.semver.version),
root:opt.dot.root,
UID:(opt.input?.etc?.uid || 1000),
GID:(opt.input?.etc?.gid || 1000),
no_cache:new Date().getTime(),
},
cache:{
registry:'localhost:5000/',
},
tags:[],
};
docker.cache.name = `${docker.image.name}:${docker.image.prefix}buildcache${docker.image.suffix}`;
docker.cache.grype = `${docker.cache.registry}${docker.image.name}:${docker.image.prefix}grype${docker.image.suffix}`;
docker.app.prefix = docker.image.prefix;
docker.app.suffix = docker.image.suffix;
// setup tags
if(opt.input?.etc?.dockerfile !== 'arch.dockerfile' && opt.input?.etc?.tag){
docker.image.tags.push(`${context.sha.substring(0,7)}`);
docker.image.tags.push(opt.input.etc.tag);
docker.image.tags.push(`${opt.input.etc.tag}-${docker.app.version}`);
docker.cache.name = `${docker.image.name}:buildcache-${opt.input.etc.tag}`;
}else if(opt.dot?.semver?.version){
const semver = opt.dot.semver.version.split('.');
docker.image.tags.push(`${context.sha.substring(0,7)}`);
if(Array.isArray(semver)){
if(semver.length >= 1) docker.image.tags.push(`${semver[0]}`);
if(semver.length >= 2) docker.image.tags.push(`${semver[0]}.${semver[1]}`);
if(semver.length >= 3) docker.image.tags.push(`${semver[0]}.${semver[1]}.${semver[2]}`);
}
if(opt.dot.semver?.stable && new RegExp(opt.dot.semver.stable, 'ig').test(docker.image.tags.join(','))) docker.image.tags.push('stable');
if(opt.dot.semver?.latest && new RegExp(opt.dot.semver.latest, 'ig').test(docker.image.tags.join(','))) docker.image.tags.push('latest');
}else if(opt.input?.etc?.version && opt.input.etc.version === 'latest'){
docker.image.tags.push('latest');
}
for(const tag of docker.image.tags){
docker.tags.push(`${docker.image.name}:${docker.image.prefix}${tag}${docker.image.suffix}`);
docker.tags.push(`ghcr.io/${docker.image.name}:${docker.image.prefix}${tag}${docker.image.suffix}`);
docker.tags.push(`quay.io/${docker.image.name}:${docker.image.prefix}${tag}${docker.image.suffix}`);
}
// setup build arguments
if(opt.input?.etc?.build?.args){
for(const arg in opt.input.etc.build.args){
docker.app[arg] = opt.input.etc.build.args[arg];
}
}
if(opt.dot?.build?.args){
for(const arg in opt.dot.build.args){
docker.app[arg] = opt.dot.build.args[arg];
}
}
const arguments = [];
for(const argument in docker.app){
arguments.push(`APP_${argument.toUpperCase()}=${docker.app[argument]}`);
}
// export to environment
core.exportVariable('DOCKER_CACHE_REGISTRY', docker.cache.registry);
core.exportVariable('DOCKER_CACHE_NAME', docker.cache.name);
core.exportVariable('DOCKER_CACHE_GRYPE', docker.cache.grype);
core.exportVariable('DOCKER_IMAGE_NAME', docker.image.name);
core.exportVariable('DOCKER_IMAGE_ARCH', docker.image.arch);
core.exportVariable('DOCKER_IMAGE_TAGS', docker.tags.join(','));
core.exportVariable('DOCKER_IMAGE_DESCRIPTION', docker.image.description);
core.exportVariable('DOCKER_IMAGE_ARGUMENTS', arguments.join("\r\n"));
core.exportVariable('DOCKER_IMAGE_DOCKERFILE', opt.input?.etc?.dockerfile || 'arch.dockerfile');
core.exportVariable('WORKFLOW_BUILD', (opt.input?.build === undefined) ? false : opt.input.build);
core.exportVariable('WORKFLOW_CREATE_RELEASE', (opt.input?.release === undefined) ? false : opt.input.release);
core.exportVariable('WORKFLOW_CREATE_README', (opt.input?.readme === undefined) ? false : opt.input.readme);
core.exportVariable('WORKFLOW_GRYPE_FAIL_ON_SEVERITY', (opt.dot?.grype?.fail === undefined) ? true : opt.dot.grype.fail);
core.exportVariable('WORKFLOW_GRYPE_SEVERITY_CUTOFF', (opt.dot?.grype?.severity || 'high'));
if(opt.dot?.readme?.comparison){
core.exportVariable('WORKFLOW_CREATE_COMPARISON', true);
core.exportVariable('WORKFLOW_CREATE_COMPARISON_FOREIGN_IMAGE', opt.dot.readme.comparison.image);
core.exportVariable('WORKFLOW_CREATE_COMPARISON_IMAGE', `${docker.image.name}:${docker.app.version}`);
}
# DOCKER
- name: docker / login to hub
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
with:
username: 11notes
password: ${{ secrets.DOCKER_TOKEN }}
- name: github / login to ghcr
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
with:
registry: ghcr.io
username: 11notes
password: ${{ secrets.GITHUB_TOKEN }}
- name: quay / login to quay
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
with:
registry: quay.io
username: 11notes+github
password: ${{ secrets.QUAY_TOKEN }}
- name: docker / setup qemu
if: env.WORKFLOW_BUILD == 'true'
uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a
- name: docker / setup buildx
if: env.WORKFLOW_BUILD == 'true'
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5
with:
driver-opts: network=host
- name: grype / build & push
- name: docker / build & push & tag grype
if: env.WORKFLOW_BUILD == 'true'
id: docker-build
uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
with:
context: .
file: arch.dockerfile
file: ${{ env.DOCKER_IMAGE_DOCKERFILE }}
push: true
platforms: ${{ env.IMAGE_ARCH }}
cache-from: type=registry,ref=${{ env.json_image }}:buildcache
cache-to: type=registry,ref=${{ env.json_image }}:buildcache,mode=max,compression=zstd,force-compression=true
platforms: ${{ env.DOCKER_IMAGE_ARCH }}
cache-from: type=registry,ref=${{ env.DOCKER_CACHE_NAME }}
cache-to: type=registry,ref=${{ env.DOCKER_CACHE_REGISTRY }}${{ env.DOCKER_CACHE_NAME }},mode=max,compression=zstd,force-compression=true
build-args: |
APP_IMAGE=${{ env.json_image }}
APP_NAME=${{ env.json_name }}
APP_VERSION=${{ env.json_version }}
APP_ROOT=${{ env.json_root }}
APP_UID=${{ env.IMAGE_UID }}
APP_GID=${{ env.IMAGE_GID }}
NO_CACHE=$(date +%s)
${{ env.DOCKER_IMAGE_ARGUMENTS }}
tags: |
${{ env.json_image }}:grype
${{ env.DOCKER_CACHE_GRYPE }}
- name: grype / scan
id: scan
uses: anchore/scan-action@abae793926ec39a78ab18002bc7fc45bbbd94342
if: env.WORKFLOW_BUILD == 'true'
id: grype
uses: anchore/scan-action@dc6246fcaf83ae86fcc6010b9824c30d7320729e
with:
image: ${{ env.json_image }}:grype
severity-cutoff: high
image: ${{ env.DOCKER_CACHE_GRYPE }}
fail-build: ${{ env.WORKFLOW_GRYPE_FAIL_ON_SEVERITY }}
severity-cutoff: ${{ env.WORKFLOW_GRYPE_SEVERITY_CUTOFF }}
output-format: 'sarif'
by-cve: true
cache-db: true
- name: grype / delete tag
if: success() || failure()
run: |
curl --request DELETE \
--url https://hub.docker.com/v2/repositories/${{ env.json_image }}/tags/grype/ \
--header 'authorization: jwt ${{ secrets.DOCKER_TOKEN }}' \
--header 'content-type: application/json' \
--fail
- name: grype / report / upload
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169
- name: grype / fail
if: env.WORKFLOW_BUILD == 'true' && (failure() || steps.grype.outcome == 'failure')
uses: anchore/scan-action@dc6246fcaf83ae86fcc6010b9824c30d7320729e
with:
sarif_file: ${{ steps.scan.outputs.sarif }}
- name: grype / report / print
run: cat ${{ steps.scan.outputs.sarif }}
image: ${{ env.DOCKER_CACHE_GRYPE }}
fail-build: false
severity-cutoff: ${{ env.WORKFLOW_GRYPE_SEVERITY_CUTOFF }}
output-format: 'table'
by-cve: true
cache-db: true
- name: docker / build & push
if: env.WORKFLOW_BUILD == 'true'
uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
with:
context: .
file: arch.dockerfile
file: ${{ env.DOCKER_IMAGE_DOCKERFILE }}
push: true
sbom: true
provenance: mode=max
platforms: ${{ env.IMAGE_ARCH }}
cache-from: type=registry,ref=${{ env.json_image }}:buildcache
cache-to: type=registry,ref=${{ env.json_image }}:buildcache,mode=max,compression=zstd,force-compression=true
platforms: ${{ env.DOCKER_IMAGE_ARCH }}
cache-from: type=registry,ref=${{ env.DOCKER_CACHE_REGISTRY }}${{ env.DOCKER_CACHE_NAME }}
cache-to: type=registry,ref=${{ env.DOCKER_CACHE_NAME }},mode=max,compression=zstd,force-compression=true
build-args: |
APP_IMAGE=${{ env.json_image }}
APP_NAME=${{ env.json_name }}
APP_VERSION=${{ env.json_version }}
APP_ROOT=${{ env.json_root }}
APP_UID=${{ env.IMAGE_UID }}
APP_GID=${{ env.IMAGE_GID }}
NO_CACHE=$(date +%s)
${{ env.DOCKER_IMAGE_ARGUMENTS }}
tags: |
${{ env.IMAGE_TAGS }}
${{ env.DOCKER_IMAGE_TAGS }}
- name: github / create release notes
# RELEASE
- name: github / release / log
continue-on-error: true
id: git-log
run: |
LOCAL_LAST_TAG=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)
echo "using last tag: ${LOCAL_LAST_TAG}"
LOCAL_COMMITS=$(git log ${LOCAL_LAST_TAG}..HEAD --oneline)
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "commits<<${EOF}" >> ${GITHUB_OUTPUT}
echo "${LOCAL_COMMITS}" >> ${GITHUB_OUTPUT}
echo "${EOF}" >> ${GITHUB_OUTPUT}
- name: github / release / markdown
if: env.WORKFLOW_CREATE_RELEASE == 'true' && steps.git-log.outcome == 'success'
id: git-release
uses: 11notes/action-docker-release@v1
# WHY IS THIS ACTION NOT SHA256 PINNED? SECURITY MUCH?!?!?!
# ---------------------------------------------------------------------------------
# the next step "github / release / create" creates a new release based on the code
# in the repo. This code is not modified and can't be modified by this action.
# It does create the markdown for the release, which could be abused, but to what
# extend? Adding a link to a malicious repo?
with:
git_log: ${{ steps.git-log.outputs.commits }}
- name: github / release / create
if: env.WORKFLOW_CREATE_RELEASE == 'true' && steps.git-release.outcome == 'success'
uses: actions/create-release@4c11c9fe1dcd9636620a16455165783b20fc7ea0
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create ${{ github.ref_name }} -F RELEASE.md
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ steps.git-release.outputs.release }}
draft: false
prerelease: false
# LICENSE
- name: license / update year
continue-on-error: true
uses: actions/github-script@62c3794a3eb6788d9a2a72b219504732c0c9a298
with:
script: |
const { existsSync, readFileSync, writeFileSync } = require('node:fs');
const { resolve } = require('node:path');
const file = 'LICENSE';
const year = new Date().getFullYear();
try{
const path = resolve(file);
if(existsSync(path)){
let license = readFileSync(file).toString();
if(!new RegExp(`Copyright \\(c\\) ${year} 11notes`, 'i').test(license)){
license = license.replace(/Copyright \(c\) \d{4} /i, `Copyright (c) ${new Date().getFullYear()} `);
writeFileSync(path, license);
}
}else{
throw new Error(`file ${file} does not exist`);
}
}catch(e){
core.setFailed(e);
}
# README
- name: github / checkout HEAD
continue-on-error: true
run: |
git checkout HEAD
- name: docker / setup comparison images
if: env.WORKFLOW_CREATE_COMPARISON == 'true'
continue-on-error: true
run: |
docker image pull ${{ env.WORKFLOW_CREATE_COMPARISON_IMAGE }}
docker image ls --filter "reference=${{ env.WORKFLOW_CREATE_COMPARISON_IMAGE }}" --format json | jq --raw-output '.Size' &> ./comparison.size0.log
docker image pull ${{ env.WORKFLOW_CREATE_COMPARISON_FOREIGN_IMAGE }}
docker image ls --filter "reference=${{ env.WORKFLOW_CREATE_COMPARISON_FOREIGN_IMAGE }}" --format json | jq --raw-output '.Size' &> ./comparison.size1.log
docker run --entrypoint "/bin/sh" --rm ${{ env.WORKFLOW_CREATE_COMPARISON_FOREIGN_IMAGE }} -c id &> ./comparison.id.log
- name: github / create README.md
id: github-readme
continue-on-error: true
if: env.WORKFLOW_CREATE_README == 'true'
uses: 11notes/action-docker-readme@v1
# WHY IS THIS ACTION NOT SHA256 PINNED? SECURITY MUCH?!?!?!
# ---------------------------------------------------------------------------------
# the next step "github / commit & push" only adds the README and LICENSE as well as
# compose.yaml to the repository. This does not pose a security risk if this action
# would be compromised. The code of the app can't be changed by this action. Since
# only the files mentioned are commited to the repo. Sure, someone could make a bad
# compose.yaml, but since this serves only as an example I see no harm in that.
with:
sarif_file: ${{ steps.grype.outputs.sarif }}
build_output_metadata: ${{ steps.docker-build.outputs.metadata }}
- name: docker / push README.md to docker hub
continue-on-error: true
if: steps.github-readme.outcome == 'success' && hashFiles('README_NONGITHUB.md') != ''
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8
env:
DOCKER_USER: 11notes
DOCKER_PASS: ${{ secrets.DOCKER_TOKEN }}
with:
destination_container_repo: ${{ env.DOCKER_IMAGE_NAME }}
provider: dockerhub
short_description: ${{ env.DOCKER_IMAGE_DESCRIPTION }}
readme_file: 'README_NONGITHUB.md'
- name: github / commit & push
continue-on-error: true
if: steps.github-readme.outcome == 'success' && hashFiles('README.md') != ''
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add README.md
if [ -f compose.yaml ]; then
git add compose.yaml
fi
if [ -f LICENSE ]; then
git add LICENSE
fi
git commit -m "github-actions[bot]: update README.md"
git push origin HEAD:master
# REPOSITORY SETTINGS
- name: github / update description and set repo defaults
run: |
curl --request PATCH \
@@ -139,22 +426,11 @@ jobs:
--header 'authorization: Bearer ${{ secrets.REPOSITORY_TOKEN }}' \
--header 'content-type: application/json' \
--data '{
"description":"${{ env.json_description }}",
"description":"${{ env.DOCKER_IMAGE_DESCRIPTION }}",
"homepage":"",
"has_issues":true,
"has_discussions":true,
"has_projects":false,
"has_wiki":false
}' \
--fail
- name: docker / push README.md to docker hub
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8
env:
DOCKER_USER: ${{ env.DOCKER_USERNAME }}
DOCKER_PASS: ${{ secrets.DOCKER_TOKEN }}
with:
destination_container_repo: ${{ env.json_image }}
provider: dockerhub
short_description: ${{ env.json_description }}
readme_file: 'README.md'
--fail

16
.github/workflows/readme.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
name: readme
on:
workflow_dispatch:
jobs:
readme:
runs-on: ubuntu-latest
steps:
- name: update README.md
uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7
with:
wait-for-completion: false
workflow: docker.yml
token: "${{ secrets.REPOSITORY_TOKEN }}"
inputs: '{ "build":"false", "release":"false", "readme":"true" }'

38
.github/workflows/tags.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: tags
on:
push:
tags:
- 'v*'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: build docker image
uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7
with:
workflow: docker.yml
token: "${{ secrets.REPOSITORY_TOKEN }}"
inputs: '{ "release":"true", "readme":"true" }'
docker-unraid:
runs-on: ubuntu-latest
steps:
- name: init / base64 nested json
uses: actions/github-script@62c3794a3eb6788d9a2a72b219504732c0c9a298
with:
script: |
const { Buffer } = require('node:buffer');
const etc = {
semversuffix:"unraid",
uid:99,
gid:100,
};
core.exportVariable('WORKFLOW_BASE64JSON', Buffer.from(JSON.stringify(etc)).toString('base64'));
- name: build docker image for unraid community
uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7
with:
wait-for-completion: false
workflow: docker.yml
token: "${{ secrets.REPOSITORY_TOKEN }}"
inputs: '{ "release":"false", "readme":"false", "run-name":"unraid", "etc":"${{ env.WORKFLOW_BASE64JSON }}" }'

3
.gitignore vendored
View File

@@ -1,2 +1 @@
maintain/
project*
maintain/

18
.json
View File

@@ -1,10 +1,20 @@
{
"image":"11notes/kms-gui",
"description":"Activate any version of Windows and Office, forever",
"name":"kms-gui",
"version":"646f476",
"root":"/kms",
"stable":"646f476",
"parent":"11notes/alpine:stable"
"semver":{
"version":"465f4d1"
},
"readme":{
"description":"Activate any version of Windows and Office, forever",
"parent":{
"image":"11notes/kms:465f4d1"
},
"built":{
"py-kms":"https://github.com/Py-KMS-Organization/py-kms",
"CustomIcon/pykms-frontend":"https://github.com/CustomIcon/pykms-frontend"
}
}
}

BIN
GUI.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020 11notes
Copyright (c) 2025 11notes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,11 +1,11 @@
![Banner](https://github.com/11notes/defaults/blob/main/static/img/banner.png?raw=true)
![banner](https://github.com/11notes/defaults/blob/main/static/img/banner.png?raw=true)
# 🏔️ kms-gui on Alpine
[<img src="https://img.shields.io/badge/github-source-blue?logo=github&color=040308">](https://github.com/11notes/docker-kms-gui)![size](https://img.shields.io/docker/image-size/11notes/kms-gui/646f476?color=0eb305)![version](https://img.shields.io/docker/v/11notes/kms-gui/646f476?color=eb7a09)![pulls](https://img.shields.io/docker/pulls/11notes/kms-gui?color=2b75d6)[<img src="https://img.shields.io/github/issues/11notes/docker-kms-gui?color=7842f5">](https://github.com/11notes/docker-kms-gui/issues)
# KMS-GUI
[<img src="https://img.shields.io/badge/github-source-blue?logo=github&color=040308">](https://github.com/11notes/docker-KMS-GUI)![5px](https://github.com/11notes/defaults/blob/main/static/img/transparent5x2px.png?raw=true)![size](https://img.shields.io/docker/image-size/11notes/kms-gui/465f4d1?color=0eb305)![5px](https://github.com/11notes/defaults/blob/main/static/img/transparent5x2px.png?raw=true)![version](https://img.shields.io/docker/v/11notes/kms-gui/465f4d1?color=eb7a09)![5px](https://github.com/11notes/defaults/blob/main/static/img/transparent5x2px.png?raw=true)![pulls](https://img.shields.io/docker/pulls/11notes/kms-gui?color=2b75d6)![5px](https://github.com/11notes/defaults/blob/main/static/img/transparent5x2px.png?raw=true)[<img src="https://img.shields.io/github/issues/11notes/docker-KMS-GUI?color=7842f5">](https://github.com/11notes/docker-KMS-GUI/issues)![5px](https://github.com/11notes/defaults/blob/main/static/img/transparent5x2px.png?raw=true)![swiss_made](https://img.shields.io/badge/Swiss_Made-FFFFFF?labelColor=FF0000&logo=data:image/svg%2bxml;base64,PHN2ZyB2ZXJzaW9uPSIxIiB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0wIDBoMzJ2MzJoLTMyeiIgZmlsbD0iI2YwMCIvPjxwYXRoIGQ9Im0xMyA2aDZ2N2g3djZoLTd2N2gtNnYtN2gtN3YtNmg3eiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==)
**Activate any version of Windows and Office, forever**
Activate any version of Windows and Office, forever
![slmgr](https://github.com/11notes/docker-kms-gui/blob/main/GUI.png?raw=true)
![Web GUI](https://github.com/11notes/docker-KMS-GUI/blob/master/img/webGUICustomIcon.png?raw=true)
# SYNOPSIS 📖
**What can I do with this?** This image will run a web GUI for your [11notes/kms](https://hub.docker.com/r/11notes/kms) server.
@@ -14,49 +14,82 @@
```yaml
name: "kms"
services:
kms:
image: "11notes/kms:latest"
container_name: "kms"
app:
image: "11notes/kms:465f4d1"
environment:
TZ: Europe/Zurich
TZ: "Europe/Zurich"
volumes:
- "var:/kms/var"
ports:
- "1688:1688/tcp"
restart: always
kms-gui:
image: "11notes/kms-gui:646f476"
container_name: "kms-gui"
restart: "always"
gui:
image: "11notes/kms-gui:465f4d1"
depends_on:
app:
condition: "service_healthy"
restart: true
environment:
TZ: Europe/Zurich
TZ: "Europe/Zurich"
volumes:
- "var:/kms/var"
ports:
- "8080:8080/tcp"
restart: always
- "3000:3000/tcp"
restart: "always"
volumes:
var:
```
# DEFAULT SETTINGS 🗃️
| Parameter | Value | Description |
| --- | --- | --- |
| `user` | docker | user name |
| `uid` | 1000 | [user identifier](https://en.wikipedia.org/wiki/User_identifier) |
| `gid` | 1000 | [group identifier](https://en.wikipedia.org/wiki/Group_identifier) |
| `home` | /kms | home directory of user docker |
# ENVIRONMENT 📝
| 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_GUI_STYLE` | switch the UI style of the webinterface (py-kms, custom-icon) | custom-icon |
# MAIN TAGS 🏷️
These are the main tags for the image. There is also a tag for each commit and its shorthand sha256 value.
* [465f4d1](https://hub.docker.com/r/11notes/kms-gui/tags?name=465f4d1)
* [465f4d1-unraid](https://hub.docker.com/r/11notes/kms-gui/tags?name=465f4d1-unraid)
# REGISTRIES ☁️
```
docker pull 11notes/kms-gui:465f4d1
docker pull ghcr.io/11notes/kms-gui:465f4d1
docker pull quay.io/11notes/kms-gui:465f4d1
```
${{ title_unraid }}
This image supports unraid by default. Simply add **-unraid** to any tag and the image will run as 99:100 instead of 1000:1000 causing no issues on unraid. Enjoy.
# SOURCE 💾
* [11notes/kms-gui](https://github.com/11notes/docker-kms-gui)
* [11notes/kms-gui](https://github.com/11notes/docker-KMS-GUI)
# PARENT IMAGE 🏛️
* [11notes/alpine:stable](https://hub.docker.com/r/11notes/alpine)
* [11notes/kms:465f4d1](https://hub.docker.com/r/11notes/kms)
# BUILT WITH 🧰
* [py-kms](https://github.com/Py-KMS-Organization/py-kms)
* [alpine](https://alpinelinux.org)
* [CustomIcon/pykms-frontend](https://github.com/CustomIcon/pykms-frontend)
* [11notes/util](https://github.com/11notes/docker-util)
# GENERAL TIPS 📌
> [!TIP]
>* Use a reverse proxy like Traefik, Nginx, HAproxy to terminate TLS and to protect your endpoints
>* Use Lets Encrypt DNS-01 challenge to obtain valid SSL certificates for your services
# TIPS 📌
* Use a reverse proxy like Traefik, Nginx, HAproxy to terminate TLS with a valid certificate
* Use Lets Encrypt certificates to protect your SSL endpoints
# ElevenNotes™
This image is provided to you at your own risk. Always make backups before updating an image to a different version. Check the [releases](https://github.com/11notes/docker-kms-gui/releases) for breaking changes. If you have any problems with using this image simply raise an [issue](https://github.com/11notes/docker-kms-gui/issues), thanks . You can find all my repositories on [github](https://github.com/11notes?tab=repositories).
This image is provided to you at your own risk. Always make backups before updating an image to a different version. Check the [releases](https://github.com/11notes/docker-kms-gui/releases) for breaking changes. If you have any problems with using this image simply raise an [issue](https://github.com/11notes/docker-kms-gui/issues), thanks. If you have a question or inputs please create a new [discussion](https://github.com/11notes/docker-kms-gui/discussions) instead of an issue. You can find all my other repositories on [github](https://github.com/11notes?tab=repositories).
*created 02.05.2025, 11:48:27 (CET)*

View File

@@ -1,2 +0,0 @@
### 🪄 Features
* switch to new github workflow and build process

View File

@@ -1,31 +1,18 @@
# :: Util
FROM alpine/git AS util
ARG NO_CACHE
ARG APP_VERSION=stable
ARG APP_PREFIX=""
ARG APP_SUFFIX=""
ARG APP_UID=1000
ARG APP_GID=1000
# :: Build / styles
FROM alpine/git AS styles
ARG APP_NO_CACHE
RUN set -ex; \
git clone https://github.com/11notes/docker-util.git;
# :: Build / redis
FROM python:3.12-alpine AS build
ARG TARGETARCH
ARG APP_VERSION
USER root
RUN set -ex; \
apk --update --no-cache add \
git; \
mkdir -p /opt/py-kms-gui; \
git clone https://github.com/Py-KMS-Organization/py-kms.git; \
cd /py-kms/py-kms; \
git checkout ${APP_VERSION}; \
cp -R /py-kms/py-kms/* /opt/py-kms-gui; \
cp -R /py-kms/docker/docker-py3-kms/requirements.txt /opt/py-kms-gui;
git clone https://github.com/11notes/pykms-frontend.git; \
cd /git/pykms-frontend;
# :: Header
FROM 11notes/alpine:stable
FROM 11notes/kms:${APP_PREFIX}${APP_VERSION}${APP_SUFFIX}
# :: arguments
ARG TARGETARCH
@@ -33,6 +20,9 @@
ARG APP_NAME
ARG APP_VERSION
ARG APP_ROOT
ARG APP_UID
ARG APP_GID
ARG APP_NO_CACHE
# :: environment
ENV APP_IMAGE=${APP_IMAGE}
@@ -40,46 +30,62 @@
ENV APP_VERSION=${APP_VERSION}
ENV APP_ROOT=${APP_ROOT}
ENV KMS_GUI_STYLE="custom-icon"
ENV PYKMS_SQLITE_DB_PATH=/kms/var/kms.db
ENV PYKMS_LICENSE_PATH=/opt/py-kms-gui/LICENSE
ENV PYKMS_VERSION_PATH=/opt/py-kms-gui/VERSION
ENV PORT=8080
ENV PYKMS_LICENSE_PATH=/opt/py-kms/LICENSE
ENV PYKMS_VERSION_PATH=/opt/py-kms/VERSION
ENV PORT=3000
ENV LOG_LEVEL=INFO
ENV PIP_ROOT_USER_ACTION=ignore
# :: multi-stage
COPY --from=util /git/docker-util/src/ /usr/local/bin
COPY --from=build /opt/py-kms-gui/ /opt/py-kms-gui
COPY ./LICENSE /opt/py-kms-gui
COPY ./LICENSE /opt/py-kms
# :: Run
USER root
RUN eleven printenv;
# :: install application
RUN set -ex; \
apk --no-cache --update add \
python3=3.12.8-r1; \
apk --no-cache --update --virtual .build add \
py3-pip;
RUN set -ex; \
mkdir -p ${APP_ROOT}/var; \
cd /opt/py-kms-gui; \
cd /opt/py-kms; \
echo "${APP_VERSION}" > VERSION; \
echo "master" >> VERSION; \
pip3 install --no-cache-dir -r /opt/py-kms-gui/requirements.txt --break-system-packages; \
apk del --no-network .build;
pip3 install --no-cache-dir --break-system-packages -r /opt/py-kms/requirements.gui.txt; \
pip3 list -o | sed 's/pip.*//' | grep . | cut -f1 -d' ' | tr " " "\n" | awk '{if(NR>=3)print}' | cut -d' ' -f1 | xargs -n1 pip3 install --no-cache-dir --break-system-packages -U; \
apk del --no-network .build; \
rm -rf /usr/lib/python3.12/site-packages/pip;
# :: copy filesystem changes and set correct permissions
COPY ./rootfs /
# :: copy filesystem changes
COPY ./rootfs /
# :: add multi template option
RUN set -ex; \
mkdir -p ${APP_ROOT}/styles/py-kms; \
mkdir -p ${APP_ROOT}/styles/custom-icon; \
cp -R /opt/py-kms/templates ${APP_ROOT}/styles/py-kms; \
cp -R /opt/py-kms/static ${APP_ROOT}/styles/py-kms; \
rm -rf /opt/py-kms/templates; \
rm -rf /opt/py-kms/static;
COPY --from=styles /git/pykms-frontend/templates ${APP_ROOT}/styles/custom-icon/templates
COPY --from=styles /git/pykms-frontend/static ${APP_ROOT}/styles/custom-icon/static
# :: set correct permissions
RUN set -ex; \
chmod +x -R /usr/local/bin; \
chown -R 1000:1000 \
${APP_ROOT};
# :: Volumes
VOLUME ["${APP_ROOT}/var"]
chown -R ${APP_UID}:${APP_GID} \
${APP_ROOT} \
/opt/py-kms;
# :: Monitor
HEALTHCHECK --interval=5s --timeout=2s CMD curl -X GET -kILs --fail http://localhost:${PORT}/livez || exit 1
# :: Start
USER docker
USER ${APP_UID}:${APP_GID}

View File

@@ -1,24 +1,28 @@
name: "kms"
services:
kms:
image: "11notes/kms:latest"
container_name: "kms"
app:
image: "11notes/kms:465f4d1"
environment:
TZ: Europe/Zurich
TZ: "Europe/Zurich"
volumes:
- "var:/kms/var"
ports:
- "1688:1688/tcp"
restart: always
kms-gui:
image: "11notes/kms-gui:646f476"
container_name: "kms-gui"
restart: "always"
gui:
image: "11notes/kms-gui:465f4d1"
depends_on:
app:
condition: "service_healthy"
restart: true
environment:
TZ: Europe/Zurich
TZ: "Europe/Zurich"
volumes:
- "var:/kms/var"
ports:
- "8080:8080/tcp"
restart: always
- "3000:3000/tcp"
restart: "always"
volumes:
var:

BIN
img/webGUICustomIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

18
project.md Normal file
View File

@@ -0,0 +1,18 @@
![Web GUI](https://github.com/11notes/docker-${{ json_name }}/blob/master/img/webGUICustomIcon.png?raw=true)
${{ content_synopsis }} This image will run a web GUI for your [11notes/kms](https://hub.docker.com/r/11notes/kms) server.
${{ content_compose }}
${{ content_defaults }}
${{ content_environment }}
| `KMS_GUI_STYLE` | switch the UI style of the webinterface (py-kms, custom-icon) | custom-icon |
${{ content_source }}
${{ content_parent }}
${{ content_built }}
${{ content_tips }}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>py-kms {% block title %}{% endblock %}</title>
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename= 'favicon.ico') }}">
<link rel="stylesheet" href="{{ url_for('static', filename= 'css/bulma.min.css') }}">
<style>
#content {
margin: 1em;
overflow-x: auto;
}
pre {
overflow-x: auto;
padding: 0.5em;
}
{% if path != '/' %}
div.backtohome {
display: flex;
justify-content: center;
}
{% endif %}
{% block style %}{% endblock %}
</style>
</head>
<body>
<div id="content">
{% block content %}{% endblock %}
{% if path != '/' %}
<div class="block backtohome">
<a class="button is-normal is-responsive" href="/">
Back to home
</a>
</div>
{% endif %}
</div>
<script>
for(let element of document.getElementsByClassName('convert_timestamp')) {
element.innerText = new Date(element.innerText).toLocaleString();
}
</script>
</body>
</html>

View File

@@ -0,0 +1,87 @@
{% extends 'base.html' %}
{% block title %}clients{% endblock %}
{% block style %}
th {
white-space: nowrap;
}
{% endblock %}
{% block content %}
{% if error %}
<article class="message is-danger">
<div class="message-header">
Whoops! Something went wrong...
</div>
<div class="message-body">
{{ error }}
</div>
</article>
{% else %}
<nav class="level">
<div class="level-item has-text-centered">
<div>
<p class="heading">Clients</p>
<p class="title">{{ count_clients }}</p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Windows</p>
<p class="title">{{ count_clients_windows }}</p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Office</p>
<p class="title">{{ count_clients_office }}</p>
</div>
</div>
</nav>
<hr>
{% if clients %}
<table class="table is-striped is-hoverable is-fullwidth">
<thead>
<tr>
<th>Client ID</th>
<th>Machine Name</th>
<th>Machine IP</th>
<th>Application ID</th>
<th><abbr title="Stock Keeping Unit">SKU</abbr> ID</th>
<th>License Status</th>
<th>Last Seen</th>
<th>KMS <abbr title="Enhanced Privacy ID">EPID</abbr></th>
<th>Seen Count</th>
</tr>
</thead>
<tbody>
{% for client in clients %}
<tr>
<th><pre class="clientMachineId">{{ client.clientMachineId }}</pre></th>
<td class="machineName">{{ client.machineName }}</td>
<td>{{ client.machineIp }}</td>
<td>{{ client.applicationId }}</td>
<td>{{ client.skuId }}</td>
<td>{{ client.licenseStatus }}</td>
<td class="convert_timestamp">{{ client.lastRequestTime }}</td>
<td>{{ client.kmsEpid }}</td>
<td>{{ client.requestCount }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<article class="message is-warning">
<div class="message-header">
<p>Whoops?</p>
</div>
<div class="message-body">
This page seems to be empty, because no clients are available. Try to use the server with a compartible client to add it to the database.
</div>
</article>
{% endif %}
{% endif %}
{% endblock %}

View File

@@ -1,10 +1,33 @@
#!/bin/ash
if [ -z "${1}" ]; then
cd /opt/py-kms-gui
if [ ! -z "${DEBUG}" ]; then
LOG_LEVEL="DEBUG"
eleven log debug "setting kms-gui log level to DEBUG"
fi
# apply correct style
rm -rf /opt/py-kms/templates
rm -rf /opt/py-kms/static
TEMPLATE_DIR=${APP_ROOT}/styles
case ${KMS_GUI_STYLE} in
py-kms)
ln -s ${TEMPLATE_DIR}/py-kms/templates /opt/py-kms/templates
ln -s ${TEMPLATE_DIR}/py-kms/static /opt/py-kms/static
eleven log info "using ${KMS_GUI_STYLE} GUI style"
;;
*)
ln -s ${TEMPLATE_DIR}/custom-icon/templates /opt/py-kms/templates
ln -s ${TEMPLATE_DIR}/custom-icon/static /opt/py-kms/static
eleven log info "using custom-icon (default) GUI style"
;;
esac
cd /opt/py-kms
set -- "gunicorn" \
--log-level INFO \
--log-level ${LOG_LEVEL} \
pykms_WebUI:app
eleven log start
fi