mirror of
				https://github.com/11notes/docker-kms-gui.git
				synced 2025-11-04 04:53:13 +00:00 
			
		
		
		
	Compare commits
	
		
			67 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					03f63033c5 | ||
| 
						 | 
					7637bf2c3d | ||
| 
						 | 
					145c6a1d82 | ||
| 
						 | 
					4221216db4 | ||
| 
						 | 
					95fbe08011 | ||
| 
						 | 
					e34127b4c7 | ||
| 
						 | 
					75a3d5d474 | ||
| 
						 | 
					24a59b471e | ||
| 
						 | 
					bf755ecf0d | ||
| 
						 | 
					2ef047319a | ||
| 
						 | 
					d608769727 | ||
| 
						 | 
					72d8d9c55c | ||
| 
						 | 
					d20153c545 | ||
| 
						 | 
					ce91a1f421 | ||
| 
						 | 
					dbce137fb8 | ||
| 
						 | 
					4aed569709 | ||
| 
						 | 
					8b1457602d | ||
| 
						 | 
					847ff77077 | ||
| 
						 | 
					cfbf6347c2 | ||
| 
						 | 
					7f4a0b5cf4 | ||
| 
						 | 
					c5bbc99c24 | ||
| 
						 | 
					971ba4ffe4 | ||
| 
						 | 
					1ba6193786 | ||
| 
						 | 
					026ad460f2 | ||
| 
						 | 
					3fe5ab5da7 | ||
| 
						 | 
					a04dad1275 | ||
| 
						 | 
					cabd8fd912 | ||
| 
						 | 
					87b0cb92ea | ||
| 
						 | 
					0ad0cd2171 | ||
| 
						 | 
					ac6cf03ce6 | ||
| 
						 | 
					5426f03cc4 | ||
| 
						 | 
					d668e52b2f | ||
| 
						 | 
					717231ea90 | ||
| 
						 | 
					3afec57439 | ||
| 
						 | 
					497b70ea6a | ||
| 
						 | 
					3e9b1a5950 | ||
| 
						 | 
					6e690e96c3 | ||
| 
						 | 
					f5249c6f6b | ||
| 
						 | 
					78c5cb68db | ||
| 
						 | 
					0cc9bf714a | ||
| 
						 | 
					33f68a3b09 | ||
| 
						 | 
					23ea81077b | ||
| 
						 | 
					4309e308b3 | ||
| 
						 | 
					36885bc9e5 | ||
| 
						 | 
					65ab5cf49f | ||
| 
						 | 
					60d6c33d69 | ||
| 
						 | 
					e555a3b1e3 | ||
| 
						 | 
					d161bab2d8 | ||
| 
						 | 
					7754585854 | ||
| 
						 | 
					2bbc9e2653 | ||
| 
						 | 
					a955ccb9b1 | ||
| 
						 | 
					3822e0e370 | ||
| 
						 | 
					c06ececada | ||
| 
						 | 
					c8b7e470e4 | ||
| 
						 | 
					eea805e13a | ||
| 
						 | 
					6909b2fc29 | ||
| 
						 | 
					caa7a8a1e6 | ||
| 
						 | 
					dcfb8ba91e | ||
| 
						 | 
					129c21344c | ||
| 
						 | 
					303774a72c | ||
| 
						 | 
					23892c6d0b | ||
| 
						 | 
					58f22ed34c | ||
| 
						 | 
					63d616adfd | ||
| 
						 | 
					b6f69b4860 | ||
| 
						 | 
					ed3ea34868 | ||
| 
						 | 
					11cf777dbd | ||
| 
						 | 
					70680a384b | 
@@ -1,4 +1,5 @@
 | 
				
			|||||||
.git*
 | 
					.git*
 | 
				
			||||||
*.md
 | 
					*.md
 | 
				
			||||||
 | 
					img/
 | 
				
			||||||
maintain/
 | 
					maintain/
 | 
				
			||||||
project*
 | 
					project*
 | 
				
			||||||
							
								
								
									
										3
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							@@ -1,2 +1 @@
 | 
				
			|||||||
# Auto detect text files and perform LF normalization
 | 
					* text=auto
 | 
				
			||||||
* text=auto
 | 
					 | 
				
			||||||
							
								
								
									
										342
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										342
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,18 +1,57 @@
 | 
				
			|||||||
name: create and publish docker image
 | 
					name: docker
 | 
				
			||||||
 | 
					run-name: ${{ inputs.run-name }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
on:
 | 
					on:
 | 
				
			||||||
  workflow_dispatch:
 | 
					  workflow_dispatch:
 | 
				
			||||||
  push:
 | 
					    inputs:
 | 
				
			||||||
    tags:
 | 
					      run-name:
 | 
				
			||||||
      - 'v*'
 | 
					        description: 'set run-name for workflow (multiple calls)'
 | 
				
			||||||
 | 
					        type: string
 | 
				
			||||||
 | 
					        required: false
 | 
				
			||||||
 | 
					        default: 'docker'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
env:
 | 
					      release:
 | 
				
			||||||
  DOCKER_USERNAME: 11notes
 | 
					        description: 'set WORKFLOW_GITHUB_RELEASE'
 | 
				
			||||||
 | 
					        required: false
 | 
				
			||||||
 | 
					        default: 'false'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      readme:
 | 
				
			||||||
 | 
					        description: 'set WORKFLOW_GITHUB_README'
 | 
				
			||||||
 | 
					        required: false
 | 
				
			||||||
 | 
					        default: 'false'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      image:
 | 
				
			||||||
 | 
					        description: 'set IMAGE'
 | 
				
			||||||
 | 
					        required: false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      uid:
 | 
				
			||||||
 | 
					        description: 'set IMAGE_UID'
 | 
				
			||||||
 | 
					        required: false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      gid:
 | 
				
			||||||
 | 
					        description: 'set IMAGE_GID'
 | 
				
			||||||
 | 
					        required: false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      semverprefix:
 | 
				
			||||||
 | 
					        description: 'prefix for semver tags'
 | 
				
			||||||
 | 
					        required: false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      semversuffix:
 | 
				
			||||||
 | 
					        description: 'suffix for semver tags'
 | 
				
			||||||
 | 
					        required: false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  build-and-push-image:
 | 
					  docker:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-22.04
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    services:
 | 
				
			||||||
 | 
					      registry:
 | 
				
			||||||
 | 
					        image: registry:2
 | 
				
			||||||
 | 
					        ports:
 | 
				
			||||||
 | 
					          - 5000:5000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    permissions:
 | 
					    permissions:
 | 
				
			||||||
 | 
					      actions: read
 | 
				
			||||||
      contents: write
 | 
					      contents: write
 | 
				
			||||||
      packages: write
 | 
					      packages: write
 | 
				
			||||||
      security-events: write
 | 
					      security-events: write
 | 
				
			||||||
@@ -20,39 +59,113 @@ jobs:
 | 
				
			|||||||
    steps:   
 | 
					    steps:   
 | 
				
			||||||
      - name: init / checkout
 | 
					      - name: init / checkout
 | 
				
			||||||
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
 | 
					        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: init / .json to env
 | 
					 | 
				
			||||||
        uses: rgarcia-phi/json-to-variables@9835d537368468c4e4de5254dc3efeadda183793
 | 
					 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          filename: '.json'
 | 
					          ref: ${{ github.ref_name }}
 | 
				
			||||||
 | 
					          fetch-depth: 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: init / setup environment
 | 
					      - name: init / setup environment
 | 
				
			||||||
        run: |
 | 
					        uses: actions/github-script@62c3794a3eb6788d9a2a72b219504732c0c9a298
 | 
				
			||||||
          : # set default arch if not set
 | 
					        with:
 | 
				
			||||||
          echo "IMAGE_ARCH=${json_arch:-linux/amd64,linux/arm64}" >> $GITHUB_ENV
 | 
					          script: |
 | 
				
			||||||
 | 
					            const { existsSync, readFileSync } = require('node:fs');
 | 
				
			||||||
 | 
					            const { resolve } = require('node:path');
 | 
				
			||||||
 | 
					            const inputs = `${{ toJSON(github.event.inputs) }}`;
 | 
				
			||||||
 | 
					            const opt = {input:{}, dot:{}};            
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          : # create tags for semver, stable and other shenanigans
 | 
					            try{
 | 
				
			||||||
          export LOCAL_SHA=$(git rev-parse --short HEAD)
 | 
					              if(inputs.length > 0){
 | 
				
			||||||
          export LOCAL_SEMVER_MAJOR=$(awk -F. '{ print $1 }' <<< ${json_version})
 | 
					                opt.input = JSON.parse(inputs);
 | 
				
			||||||
          export LOCAL_SEMVER_MINOR=$(awk -F. '{ print $2 }' <<< ${json_version})
 | 
					              }
 | 
				
			||||||
          export LOCAL_SEMVER_PATCH=$(awk -F. '{ print $3 }' <<< ${json_version})
 | 
					            }catch(e){
 | 
				
			||||||
          export LOCAL_TAGS="${json_image}:latest"
 | 
					              core.warning('could not parse github.event.inputs');
 | 
				
			||||||
          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
 | 
					            try{
 | 
				
			||||||
          echo "IMAGE_UID=${json_uid:-1000}" >> $GITHUB_ENV
 | 
					              const path = resolve('.json');
 | 
				
			||||||
          echo "IMAGE_GID=${json_gid:-1000}" >> $GITHUB_ENV
 | 
					              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);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            const docker = {
 | 
				
			||||||
 | 
					              image:{
 | 
				
			||||||
 | 
					                name:(opt.input?.image || opt.dot.image),
 | 
				
			||||||
 | 
					                arch:(opt.dot.arch || 'linux/amd64,linux/arm64'),
 | 
				
			||||||
 | 
					                prefix:((opt.input?.semverprefix) ? `${opt.input?.semverprefix}-` : ''),
 | 
				
			||||||
 | 
					                suffix:((opt.input?.semversuffix) ? `-${opt.input?.semversuffix}` : ''),
 | 
				
			||||||
 | 
					                description:(opt.dot?.readme?.description || ''),
 | 
				
			||||||
 | 
					                tags:[],
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					              app:{
 | 
				
			||||||
 | 
					                name:opt.dot.name,
 | 
				
			||||||
 | 
					                version:opt.dot.semver.version,
 | 
				
			||||||
 | 
					                root:opt.dot.root,
 | 
				
			||||||
 | 
					                UID:(opt.input?.uid || 1000),
 | 
				
			||||||
 | 
					                GID:(opt.input?.gid || 1000),
 | 
				
			||||||
 | 
					                no_cache:new Date().getTime(),
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					              cache:{
 | 
				
			||||||
 | 
					                registry:'localhost:5000/',
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            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
 | 
				
			||||||
 | 
					              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');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              for(let i=0; i<docker.image.tags.length; i++){
 | 
				
			||||||
 | 
					                docker.image.tags[i] = `${docker.image.name}:${docker.image.prefix}${docker.image.tags[i]}${docker.image.suffix}`;
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // setup build arguments
 | 
				
			||||||
 | 
					              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.image.tags.join(','));
 | 
				
			||||||
 | 
					              core.exportVariable('DOCKER_IMAGE_DESCRIPTION', docker.image.description);
 | 
				
			||||||
 | 
					              core.exportVariable('DOCKER_IMAGE_ARGUMENTS', arguments.join("\r\n"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              core.exportVariable('WORKFLOW_CREATE_RELEASE', (opt.input?.release || true));
 | 
				
			||||||
 | 
					              core.exportVariable('WORKFLOW_CREATE_README', (opt.input?.readme || true));
 | 
				
			||||||
 | 
					              core.exportVariable('WORKFLOW_GRYPE_FAIL_ON_SEVERITY', (opt.json?.grpye?.fail || true));
 | 
				
			||||||
 | 
					              core.exportVariable('WORKFLOW_GRYPE_SEVERITY_CUTOFF', (opt.json?.grpye?.severity || 'high'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # DOCKER    
 | 
				
			||||||
      - name: docker / login to hub
 | 
					      - name: docker / login to hub
 | 
				
			||||||
        uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
 | 
					        uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          username: ${{ env.DOCKER_USERNAME }}
 | 
					          username: 11notes
 | 
				
			||||||
          password: ${{ secrets.DOCKER_TOKEN }}
 | 
					          password: ${{ secrets.DOCKER_TOKEN }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: docker / setup qemu
 | 
					      - name: docker / setup qemu
 | 
				
			||||||
@@ -60,50 +173,45 @@ jobs:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      - name: docker / setup buildx
 | 
					      - name: docker / setup buildx
 | 
				
			||||||
        uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5
 | 
					        uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          driver-opts: network=host
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: grype / build & push
 | 
					      - name: docker / build & push & tag grype
 | 
				
			||||||
 | 
					        id: docker-build
 | 
				
			||||||
        uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
 | 
					        uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          context: .
 | 
					          context: .
 | 
				
			||||||
          file: arch.dockerfile
 | 
					          file: arch.dockerfile
 | 
				
			||||||
          push: true
 | 
					          push: true
 | 
				
			||||||
          platforms: ${{ env.IMAGE_ARCH }}
 | 
					          platforms: ${{ env.DOCKER_IMAGE_ARCH }}
 | 
				
			||||||
          cache-from: type=registry,ref=${{ env.json_image }}:buildcache
 | 
					          cache-from: type=registry,ref=${{ env.DOCKER_CACHE_NAME }}
 | 
				
			||||||
          cache-to: type=registry,ref=${{ env.json_image }}:buildcache,mode=max,compression=zstd,force-compression=true
 | 
					          cache-to: type=registry,ref=${{ env.DOCKER_CACHE_REGISTRY }}${{ env.DOCKER_CACHE_NAME }},mode=max,compression=zstd,force-compression=true
 | 
				
			||||||
          build-args: |
 | 
					          build-args: |
 | 
				
			||||||
            APP_IMAGE=${{ env.json_image }}
 | 
					            ${{ env.DOCKER_IMAGE_ARGUMENTS }}
 | 
				
			||||||
            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)
 | 
					 | 
				
			||||||
          tags: |
 | 
					          tags: |
 | 
				
			||||||
            ${{ env.json_image }}:grype
 | 
					            ${{ env.DOCKER_CACHE_GRYPE }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: grype / scan
 | 
					      - name: grype / scan
 | 
				
			||||||
        id: scan
 | 
					        id: grype
 | 
				
			||||||
        uses: anchore/scan-action@abae793926ec39a78ab18002bc7fc45bbbd94342
 | 
					        uses: anchore/scan-action@abae793926ec39a78ab18002bc7fc45bbbd94342
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          image: ${{ env.json_image }}:grype
 | 
					          image: ${{ env.DOCKER_CACHE_GRYPE }}
 | 
				
			||||||
          severity-cutoff: high
 | 
					          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
 | 
					      - name: grype / fail
 | 
				
			||||||
        if: success() || failure()
 | 
					        if: failure() || steps.grype.outcome == 'failure'
 | 
				
			||||||
        run: |
 | 
					        uses: anchore/scan-action@abae793926ec39a78ab18002bc7fc45bbbd94342
 | 
				
			||||||
          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
 | 
					 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          sarif_file: ${{ steps.scan.outputs.sarif }}
 | 
					          image: ${{ env.DOCKER_CACHE_GRYPE }}
 | 
				
			||||||
 | 
					          fail-build: false
 | 
				
			||||||
      - name: grype / report / print
 | 
					          severity-cutoff: ${{ env.WORKFLOW_GRYPE_SEVERITY_CUTOFF }}
 | 
				
			||||||
        run: cat ${{ steps.scan.outputs.sarif }}
 | 
					          output-format: 'table'
 | 
				
			||||||
 | 
					          by-cve: true
 | 
				
			||||||
 | 
					          cache-db: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: docker / build & push
 | 
					      - name: docker / build & push
 | 
				
			||||||
        uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
 | 
					        uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
 | 
				
			||||||
@@ -113,25 +221,92 @@ jobs:
 | 
				
			|||||||
          push: true
 | 
					          push: true
 | 
				
			||||||
          sbom: true
 | 
					          sbom: true
 | 
				
			||||||
          provenance: mode=max
 | 
					          provenance: mode=max
 | 
				
			||||||
          platforms: ${{ env.IMAGE_ARCH }}
 | 
					          platforms: ${{ env.DOCKER_IMAGE_ARCH }}
 | 
				
			||||||
          cache-from: type=registry,ref=${{ env.json_image }}:buildcache
 | 
					          cache-from: type=registry,ref=${{ env.DOCKER_CACHE_REGISTRY }}${{ env.DOCKER_CACHE_NAME }}
 | 
				
			||||||
          cache-to: type=registry,ref=${{ env.json_image }}:buildcache,mode=max,compression=zstd,force-compression=true
 | 
					          cache-to: type=registry,ref=${{ env.DOCKER_CACHE_NAME }},mode=max,compression=zstd,force-compression=true
 | 
				
			||||||
          build-args: |
 | 
					          build-args: |
 | 
				
			||||||
            APP_IMAGE=${{ env.json_image }}
 | 
					            ${{ env.DOCKER_IMAGE_ARGUMENTS }}
 | 
				
			||||||
            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)
 | 
					 | 
				
			||||||
          tags: |
 | 
					          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
 | 
				
			||||||
 | 
					        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:
 | 
					        env:
 | 
				
			||||||
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
					          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
				
			||||||
        run: gh release create ${{ github.ref_name }} -F RELEASE.md
 | 
					        with:
 | 
				
			||||||
 | 
					          tag_name: ${{ github.ref }}
 | 
				
			||||||
 | 
					          release_name: ${{ github.ref }}
 | 
				
			||||||
 | 
					          body: ${{ steps.git-release.outputs.release }}
 | 
				
			||||||
 | 
					          draft: false
 | 
				
			||||||
 | 
					          prerelease: false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # README
 | 
				
			||||||
 | 
					      - name: github / checkout master
 | 
				
			||||||
 | 
					        continue-on-error: true
 | 
				
			||||||
 | 
					        run: |         
 | 
				
			||||||
 | 
					          git checkout master
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: github / create README.md
 | 
				
			||||||
 | 
					        id: github-readme
 | 
				
			||||||
 | 
					        continue-on-error: true
 | 
				
			||||||
 | 
					        if: env.WORKFLOW_CREATE_README == 'true' && steps.docker-build.outcome == 'success'
 | 
				
			||||||
 | 
					        uses: 11notes/action-docker-readme@v1
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          sarif_file: ${{ steps.grype.outputs.sarif }}
 | 
				
			||||||
 | 
					          build_output_metadata: ${{ steps.docker-build.outputs.metadata }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - 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
 | 
				
			||||||
 | 
					          git commit -m "auto update README.md"
 | 
				
			||||||
 | 
					          git push
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: docker / push README.md to docker hub
 | 
				
			||||||
 | 
					        continue-on-error: true
 | 
				
			||||||
 | 
					        if: steps.github-readme.outcome == 'success' && hashFiles('README.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.md'
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # REPOSITORY SETTINGS
 | 
				
			||||||
      - name: github / update description and set repo defaults
 | 
					      - name: github / update description and set repo defaults
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          curl --request PATCH \
 | 
					          curl --request PATCH \
 | 
				
			||||||
@@ -139,22 +314,11 @@ jobs:
 | 
				
			|||||||
            --header 'authorization: Bearer ${{ secrets.REPOSITORY_TOKEN }}' \
 | 
					            --header 'authorization: Bearer ${{ secrets.REPOSITORY_TOKEN }}' \
 | 
				
			||||||
            --header 'content-type: application/json' \
 | 
					            --header 'content-type: application/json' \
 | 
				
			||||||
            --data '{
 | 
					            --data '{
 | 
				
			||||||
              "description":"${{ env.json_description }}",
 | 
					              "description":"${{ env.DOCKER_IMAGE_DESCRIPTION }}",
 | 
				
			||||||
              "homepage":"",
 | 
					              "homepage":"",
 | 
				
			||||||
              "has_issues":true,
 | 
					              "has_issues":true,
 | 
				
			||||||
              "has_discussions":true,
 | 
					              "has_discussions":true,
 | 
				
			||||||
              "has_projects":false,
 | 
					              "has_projects":false,
 | 
				
			||||||
              "has_wiki":false
 | 
					              "has_wiki":false
 | 
				
			||||||
            }' \
 | 
					            }' \
 | 
				
			||||||
            --fail
 | 
					            --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'
 | 
					 | 
				
			||||||
							
								
								
									
										25
									
								
								.github/workflows/tags.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								.github/workflows/tags.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
				
			|||||||
 | 
					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: build docker image for unraid community
 | 
				
			||||||
 | 
					        uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          workflow: docker.yml
 | 
				
			||||||
 | 
					          token: "${{ secrets.REPOSITORY_TOKEN }}"
 | 
				
			||||||
 | 
					          inputs: '{ "release":"false", "readme":"false", "uid":"99", "gid":"100", "semversuffix":"unraid", "run-name":"docker-unraid" }'
 | 
				
			||||||
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -1,2 +1 @@
 | 
				
			|||||||
maintain/
 | 
					maintain/
 | 
				
			||||||
project*
 | 
					 | 
				
			||||||
							
								
								
									
										20
									
								
								.json
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								.json
									
									
									
									
									
								
							@@ -1,10 +1,22 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "image":"11notes/kms-gui",
 | 
					  "image":"11notes/kms-gui",
 | 
				
			||||||
  "description":"Activate any version of Windows and Office, forever",
 | 
					 | 
				
			||||||
  "name":"kms-gui",
 | 
					  "name":"kms-gui",
 | 
				
			||||||
  "version":"646f476",
 | 
					 | 
				
			||||||
  "root":"/kms",
 | 
					  "root":"/kms",
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  "stable":"646f476",
 | 
					  "semver":{
 | 
				
			||||||
  "parent":"11notes/alpine:stable"
 | 
					    "version":"465f4d1",
 | 
				
			||||||
 | 
					    "stable":"465f4d1",
 | 
				
			||||||
 | 
					    "latest":"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"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
							
								
								
									
										54
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										54
									
								
								README.md
									
									
									
									
									
								
							@@ -1,11 +1,24 @@
 | 
				
			|||||||

 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 🏔️ kms-gui on Alpine
 | 
					# ⛰️ kms-gui
 | 
				
			||||||
[<img src="https://img.shields.io/badge/github-source-blue?logo=github&color=040308">](https://github.com/11notes/docker-kms-gui)[<img src="https://img.shields.io/github/issues/11notes/docker-kms-gui?color=7842f5">](https://github.com/11notes/docker-kms-gui/issues)
 | 
					[<img src="https://img.shields.io/badge/github-source-blue?logo=github&color=040308">](https://github.com/11notes/docker-kms-gui)[<img src="https://img.shields.io/github/issues/11notes/docker-kms-gui?color=7842f5">](https://github.com/11notes/docker-kms-gui/issues)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Activate any version of Windows and Office, forever**
 | 
					Activate any version of Windows and Office, forever
 | 
				
			||||||
 | 
					
 | 
				
			||||||

 | 
					# 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)
 | 
				
			||||||
 | 
					* [stable](https://hub.docker.com/r/11notes/kms-gui/tags?name=stable)
 | 
				
			||||||
 | 
					* [latest](https://hub.docker.com/r/11notes/kms-gui/tags?name=latest)
 | 
				
			||||||
 | 
					* [465f4d1-unraid](https://hub.docker.com/r/11notes/kms-gui/tags?name=465f4d1-unraid)
 | 
				
			||||||
 | 
					* [stable-unraid](https://hub.docker.com/r/11notes/kms-gui/tags?name=stable-unraid)
 | 
				
			||||||
 | 
					* [latest-unraid](https://hub.docker.com/r/11notes/kms-gui/tags?name=latest-unraid)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# UNRAID VERSION 🟠
 | 
				
			||||||
 | 
					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.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# SYNOPSIS 📖
 | 
					# 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.
 | 
					**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.
 | 
				
			||||||
@@ -15,7 +28,7 @@
 | 
				
			|||||||
name: "kms"
 | 
					name: "kms"
 | 
				
			||||||
services:
 | 
					services:
 | 
				
			||||||
  kms:
 | 
					  kms:
 | 
				
			||||||
    image: "11notes/kms:latest"
 | 
					    image: "11notes/kms:stable"
 | 
				
			||||||
    container_name: "kms"
 | 
					    container_name: "kms"
 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      TZ: Europe/Zurich
 | 
					      TZ: Europe/Zurich
 | 
				
			||||||
@@ -25,7 +38,7 @@ services:
 | 
				
			|||||||
      - "1688:1688/tcp"
 | 
					      - "1688:1688/tcp"
 | 
				
			||||||
    restart: always
 | 
					    restart: always
 | 
				
			||||||
  kms-gui:
 | 
					  kms-gui:
 | 
				
			||||||
    image: "11notes/kms-gui:646f476"
 | 
					    image: "11notes/kms-gui:465f4d1"
 | 
				
			||||||
    container_name: "kms-gui"
 | 
					    container_name: "kms-gui"
 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      TZ: Europe/Zurich
 | 
					      TZ: Europe/Zurich
 | 
				
			||||||
@@ -38,25 +51,36 @@ volumes:
 | 
				
			|||||||
  var:
 | 
					  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 📝
 | 
					# ENVIRONMENT 📝
 | 
				
			||||||
| Parameter | Value | Default |
 | 
					| Parameter | Value | Default |
 | 
				
			||||||
| --- | --- | --- |
 | 
					| --- | --- | --- |
 | 
				
			||||||
| `TZ` | [Time Zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) | |
 | 
					| `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 |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# SOURCE 💾
 | 
					# SOURCE 💾
 | 
				
			||||||
* [11notes/kms-gui](https://github.com/11notes/docker-kms-gui)
 | 
					* [11notes/kms-gui](https://github.com/11notes/docker-kms-gui)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# PARENT IMAGE 🏛️
 | 
					# PARENT IMAGE 🏛️
 | 
				
			||||||
* [11notes/alpine:stable](https://hub.docker.com/r/11notes/alpine)
 | 
					* [11notes/kms:465f4d1](https://hub.docker.com/r/11notes/kms)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# BUILT WITH 🧰
 | 
					# BUILT WITH 🧰
 | 
				
			||||||
* [py-kms](https://github.com/Py-KMS-Organization/py-kms)
 | 
					* [py-kms](https://github.com/Py-KMS-Organization/py-kms)
 | 
				
			||||||
* [alpine](https://alpinelinux.org)
 | 
					* [CustomIcon/pykms-frontend](https://github.com/CustomIcon/pykms-frontend)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# GENERAL TIPS 📌
 | 
				
			||||||
 | 
					* Use a reverse proxy like Traefik, Nginx, HAproxy to terminate TLS and to protect your endpoints
 | 
				
			||||||
 | 
					* Use Let’s 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 Let’s Encrypt certificates to protect your SSL endpoints
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
# ElevenNotes™️
 | 
					# 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 7.3.2025, 12:07:09 (CET)*
 | 
				
			||||||
@@ -1,2 +0,0 @@
 | 
				
			|||||||
### 🪄 Features
 | 
					 | 
				
			||||||
* switch to new github workflow and build process
 | 
					 | 
				
			||||||
@@ -1,31 +1,16 @@
 | 
				
			|||||||
# :: Util
 | 
					ARG APP_VERSION=stable
 | 
				
			||||||
  FROM alpine/git AS util
 | 
					ARG APP_PREFIX=""
 | 
				
			||||||
 | 
					ARG APP_SUFFIX=""
 | 
				
			||||||
  ARG NO_CACHE
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# :: Build / styles
 | 
				
			||||||
 | 
					  FROM alpine/git AS styles
 | 
				
			||||||
 | 
					  ARG APP_NO_CACHE
 | 
				
			||||||
  RUN set -ex; \
 | 
					  RUN set -ex; \
 | 
				
			||||||
    git clone https://github.com/11notes/docker-util.git;
 | 
					    git clone https://github.com/11notes/pykms-frontend.git; \
 | 
				
			||||||
 | 
					    cd /git/pykms-frontend;
 | 
				
			||||||
# :: 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;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# :: Header
 | 
					# :: Header
 | 
				
			||||||
  FROM 11notes/alpine:stable
 | 
					  FROM 11notes/kms:${APP_PREFIX}${APP_VERSION}${APP_SUFFIX}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # :: arguments
 | 
					  # :: arguments
 | 
				
			||||||
    ARG TARGETARCH
 | 
					    ARG TARGETARCH
 | 
				
			||||||
@@ -33,6 +18,8 @@
 | 
				
			|||||||
    ARG APP_NAME
 | 
					    ARG APP_NAME
 | 
				
			||||||
    ARG APP_VERSION
 | 
					    ARG APP_VERSION
 | 
				
			||||||
    ARG APP_ROOT
 | 
					    ARG APP_ROOT
 | 
				
			||||||
 | 
					    ARG APP_UID
 | 
				
			||||||
 | 
					    ARG APP_GID
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # :: environment
 | 
					  # :: environment
 | 
				
			||||||
    ENV APP_IMAGE=${APP_IMAGE}
 | 
					    ENV APP_IMAGE=${APP_IMAGE}
 | 
				
			||||||
@@ -40,43 +27,55 @@
 | 
				
			|||||||
    ENV APP_VERSION=${APP_VERSION}
 | 
					    ENV APP_VERSION=${APP_VERSION}
 | 
				
			||||||
    ENV APP_ROOT=${APP_ROOT}
 | 
					    ENV APP_ROOT=${APP_ROOT}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ENV KMS_GUI_STYLE="custom-icon"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ENV PYKMS_SQLITE_DB_PATH=/kms/var/kms.db
 | 
					    ENV PYKMS_SQLITE_DB_PATH=/kms/var/kms.db
 | 
				
			||||||
    ENV PYKMS_LICENSE_PATH=/opt/py-kms-gui/LICENSE
 | 
					    ENV PYKMS_LICENSE_PATH=/opt/py-kms/LICENSE
 | 
				
			||||||
    ENV PYKMS_VERSION_PATH=/opt/py-kms-gui/VERSION
 | 
					    ENV PYKMS_VERSION_PATH=/opt/py-kms/VERSION
 | 
				
			||||||
    ENV PORT=8080
 | 
					    ENV PORT=8080
 | 
				
			||||||
 | 
					    ENV LOG_LEVEL=INFO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # :: multi-stage
 | 
					  # :: multi-stage
 | 
				
			||||||
    COPY --from=util /git/docker-util/src/ /usr/local/bin
 | 
					    COPY ./LICENSE /opt/py-kms
 | 
				
			||||||
    COPY --from=build /opt/py-kms-gui/ /opt/py-kms-gui
 | 
					 | 
				
			||||||
    COPY ./LICENSE /opt/py-kms-gui
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # :: Run
 | 
					  # :: Run
 | 
				
			||||||
  USER root
 | 
					  USER root
 | 
				
			||||||
 | 
					  RUN eleven printenv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # :: install application
 | 
					  # :: install application
 | 
				
			||||||
    RUN set -ex; \
 | 
					    RUN set -ex; \
 | 
				
			||||||
      apk --no-cache --update add \
 | 
					 | 
				
			||||||
        python3=3.12.8-r1; \
 | 
					 | 
				
			||||||
      apk --no-cache --update --virtual .build add \
 | 
					      apk --no-cache --update --virtual .build add \
 | 
				
			||||||
        py3-pip;
 | 
					        py3-pip;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    RUN set -ex; \
 | 
					    RUN set -ex; \
 | 
				
			||||||
      mkdir -p ${APP_ROOT}/var; \
 | 
					      mkdir -p ${APP_ROOT}/var; \
 | 
				
			||||||
      cd /opt/py-kms-gui; \
 | 
					      cd /opt/py-kms; \
 | 
				
			||||||
      echo "${APP_VERSION}" > VERSION; \
 | 
					      echo "${APP_VERSION}" > VERSION; \
 | 
				
			||||||
      echo "master" >> VERSION; \
 | 
					      echo "master" >> VERSION; \
 | 
				
			||||||
      pip3 install --no-cache-dir -r /opt/py-kms-gui/requirements.txt --break-system-packages; \
 | 
					      pip3 install --no-cache-dir -r /opt/py-kms/requirements.gui.txt --break-system-packages; \
 | 
				
			||||||
      apk del --no-network .build;
 | 
					      apk del --no-network .build;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # :: copy filesystem changes and set correct permissions
 | 
					  # :: copy filesystem changes
 | 
				
			||||||
    COPY ./rootfs /
 | 
					    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; \
 | 
					    RUN set -ex; \
 | 
				
			||||||
      chmod +x -R /usr/local/bin; \
 | 
					      chmod +x -R /usr/local/bin; \
 | 
				
			||||||
      chown -R 1000:1000 \
 | 
					      chown -R ${APP_UID}:${APP_GID} \
 | 
				
			||||||
        ${APP_ROOT};
 | 
					        ${APP_ROOT} \
 | 
				
			||||||
 | 
					        /opt/py-kms;
 | 
				
			||||||
# :: Volumes
 | 
					 | 
				
			||||||
  VOLUME ["${APP_ROOT}/var"]
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# :: Monitor
 | 
					# :: Monitor
 | 
				
			||||||
  HEALTHCHECK --interval=5s --timeout=2s CMD curl -X GET -kILs --fail http://localhost:${PORT}/livez || exit 1
 | 
					  HEALTHCHECK --interval=5s --timeout=2s CMD curl -X GET -kILs --fail http://localhost:${PORT}/livez || exit 1
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										16
									
								
								compose.yaml
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								compose.yaml
									
									
									
									
									
								
							@@ -1,24 +1,28 @@
 | 
				
			|||||||
name: "kms"
 | 
					name: "kms"
 | 
				
			||||||
services:
 | 
					services:
 | 
				
			||||||
  kms:
 | 
					  kms:
 | 
				
			||||||
    image: "11notes/kms:latest"
 | 
					    image: "11notes/kms:stable"
 | 
				
			||||||
    container_name: "kms"
 | 
					    container_name: "kms"
 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      TZ: Europe/Zurich
 | 
					      TZ: "Europe/Zurich"
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - "var:/kms/var"
 | 
					      - "var:/kms/var"
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
      - "1688:1688/tcp"
 | 
					      - "1688:1688/tcp"
 | 
				
			||||||
    restart: always
 | 
					    restart: "always"
 | 
				
			||||||
  kms-gui:
 | 
					  kms-gui:
 | 
				
			||||||
    image: "11notes/kms-gui:646f476"
 | 
					    image: "11notes/kms-gui:465f4d1"
 | 
				
			||||||
 | 
					    depends_on:
 | 
				
			||||||
 | 
					      kms:
 | 
				
			||||||
 | 
					        condition: "service_healthy"
 | 
				
			||||||
 | 
					        restart: true
 | 
				
			||||||
    container_name: "kms-gui"
 | 
					    container_name: "kms-gui"
 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      TZ: Europe/Zurich
 | 
					      TZ: "Europe/Zurich"
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - "var:/kms/var"
 | 
					      - "var:/kms/var"
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
      - "8080:8080/tcp"
 | 
					      - "8080:8080/tcp"
 | 
				
			||||||
    restart: always
 | 
					    restart: "always"
 | 
				
			||||||
volumes:
 | 
					volumes:
 | 
				
			||||||
  var:
 | 
					  var:
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								img/webGUICustomIcon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								img/webGUICustomIcon.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 38 KiB  | 
							
								
								
									
										18
									
								
								project.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								project.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					${{ 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
											
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								rootfs/opt/py-kms/static/favicon.ico
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								rootfs/opt/py-kms/static/favicon.ico
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 4.2 KiB  | 
							
								
								
									
										45
									
								
								rootfs/opt/py-kms/templates/base.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								rootfs/opt/py-kms/templates/base.html
									
									
									
									
									
										Normal 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>
 | 
				
			||||||
							
								
								
									
										87
									
								
								rootfs/opt/py-kms/templates/clients.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								rootfs/opt/py-kms/templates/clients.html
									
									
									
									
									
										Normal 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 %}
 | 
				
			||||||
@@ -1,10 +1,33 @@
 | 
				
			|||||||
#!/bin/ash
 | 
					#!/bin/ash
 | 
				
			||||||
  if [ -z "${1}" ]; then
 | 
					  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" \
 | 
					    set -- "gunicorn" \
 | 
				
			||||||
      --log-level INFO \
 | 
					      --log-level ${LOG_LEVEL} \
 | 
				
			||||||
      pykms_WebUI:app
 | 
					      pykms_WebUI:app
 | 
				
			||||||
      
 | 
					
 | 
				
			||||||
    eleven log start
 | 
					    eleven log start
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user