mirror of
				https://github.com/11notes/docker-kms-gui.git
				synced 2025-11-04 04:53:13 +00:00 
			
		
		
		
	Compare commits
	
		
			19 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					ce91a1f421 | ||
| 
						 | 
					4aed569709 | ||
| 
						 | 
					8b1457602d | ||
| 
						 | 
					847ff77077 | ||
| 
						 | 
					cfbf6347c2 | ||
| 
						 | 
					7f4a0b5cf4 | ||
| 
						 | 
					c5bbc99c24 | ||
| 
						 | 
					971ba4ffe4 | ||
| 
						 | 
					1ba6193786 | ||
| 
						 | 
					026ad460f2 | ||
| 
						 | 
					3fe5ab5da7 | ||
| 
						 | 
					a04dad1275 | ||
| 
						 | 
					cabd8fd912 | ||
| 
						 | 
					87b0cb92ea | ||
| 
						 | 
					0ad0cd2171 | ||
| 
						 | 
					ac6cf03ce6 | ||
| 
						 | 
					5426f03cc4 | ||
| 
						 | 
					d668e52b2f | ||
| 
						 | 
					3afec57439 | 
							
								
								
									
										105
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										105
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							@@ -53,7 +53,8 @@ jobs:
 | 
			
		||||
      - name: init / checkout
 | 
			
		||||
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
 | 
			
		||||
        with:
 | 
			
		||||
          ref: master
 | 
			
		||||
          ref: ${{ github.ref_name }}
 | 
			
		||||
          fetch-depth: 0
 | 
			
		||||
 | 
			
		||||
      - name: init / inputs to env
 | 
			
		||||
        if: github.event_name == 'workflow_dispatch'
 | 
			
		||||
@@ -62,6 +63,7 @@ jobs:
 | 
			
		||||
          ${{ toJSON(github.event.inputs) }}
 | 
			
		||||
          EOF
 | 
			
		||||
          for KEY in $(cat .inputs | jq --raw-output 'keys[]' | tr '\n' ' '); do echo "input_$(echo ${KEY} | tr '[:upper:]' '[:lower:]')=$(cat .inputs | jq --raw-output '.'${KEY}'')" >> $GITHUB_ENV; done
 | 
			
		||||
          rm -rf .inputs
 | 
			
		||||
 | 
			
		||||
      - name: init / .json to env
 | 
			
		||||
        uses: rgarcia-phi/json-to-variables@9835d537368468c4e4de5254dc3efeadda183793
 | 
			
		||||
@@ -200,12 +202,71 @@ jobs:
 | 
			
		||||
          tags: |
 | 
			
		||||
            ${{ env.IMAGE_TAGS }}
 | 
			
		||||
 | 
			
		||||
      - name: github / create release notes
 | 
			
		||||
        if: env.WORKFLOW_GITHUB_RELEASE == 'true' && hashFiles('RELEASE.md') != ''
 | 
			
		||||
        env:
 | 
			
		||||
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
			
		||||
      - name: github / release / log
 | 
			
		||||
        id: git-log
 | 
			
		||||
        run: |
 | 
			
		||||
          gh release create ${{ github.ref_name }} -F RELEASE.md
 | 
			
		||||
          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_GITHUB_RELEASE == 'true'
 | 
			
		||||
        id: git-release
 | 
			
		||||
        uses: 11notes/action-docker-release@v1
 | 
			
		||||
        with:
 | 
			
		||||
          git_log: ${{ steps.git-log.outputs.commits }}
 | 
			
		||||
 | 
			
		||||
      - name: github / release / create
 | 
			
		||||
        if: env.WORKFLOW_GITHUB_RELEASE == 'true' && steps.git-release.outcome == 'success'
 | 
			
		||||
        uses: actions/create-release@4c11c9fe1dcd9636620a16455165783b20fc7ea0
 | 
			
		||||
        env:
 | 
			
		||||
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
			
		||||
        with:
 | 
			
		||||
          tag_name: ${{ github.ref }}
 | 
			
		||||
          release_name: ${{ github.ref }}
 | 
			
		||||
          body: ${{ steps.git-release.outputs.release }}
 | 
			
		||||
          draft: false
 | 
			
		||||
          prerelease: false
 | 
			
		||||
 | 
			
		||||
      - name: github / checkout master
 | 
			
		||||
        continue-on-error: true
 | 
			
		||||
        run: |         
 | 
			
		||||
          git checkout master
 | 
			
		||||
 | 
			
		||||
      - name: github / create README.md
 | 
			
		||||
        continue-on-error: true
 | 
			
		||||
        if: env.WORKFLOW_GITHUB_README == 'true'
 | 
			
		||||
        id: github-readme
 | 
			
		||||
        uses: 11notes/action-docker-readme@v1
 | 
			
		||||
        with:
 | 
			
		||||
          sarif_file: ${{ steps.grype-scan.outputs.sarif }}
 | 
			
		||||
 | 
			
		||||
      - name: github / commit & push
 | 
			
		||||
        continue-on-error: true
 | 
			
		||||
        if: steps.github-readme.outcome == 'success'
 | 
			
		||||
        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
 | 
			
		||||
        if: 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.IMAGE }}
 | 
			
		||||
          provider: dockerhub
 | 
			
		||||
          short_description: ${{ env.json_readme_description }}
 | 
			
		||||
          readme_file: 'README.md'
 | 
			
		||||
 | 
			
		||||
      - name: github / update description and set repo defaults
 | 
			
		||||
        run: |
 | 
			
		||||
@@ -221,34 +282,4 @@ jobs:
 | 
			
		||||
              "has_projects":false,
 | 
			
		||||
              "has_wiki":false
 | 
			
		||||
            }' \
 | 
			
		||||
            --fail
 | 
			
		||||
 | 
			
		||||
      - name: github / create README.md
 | 
			
		||||
        continue-on-error: true
 | 
			
		||||
        if: env.WORKFLOW_GITHUB_README == 'true'
 | 
			
		||||
        id: github-readme
 | 
			
		||||
        uses: 11notes/action-docker-readme@v1
 | 
			
		||||
        with:
 | 
			
		||||
          sarif_file: ${{ steps.grype-scan.outputs.sarif }}
 | 
			
		||||
 | 
			
		||||
      - name: github / commit & push
 | 
			
		||||
        continue-on-error: true
 | 
			
		||||
        if: steps.github-readme.outcome == 'success'
 | 
			
		||||
        run: |
 | 
			
		||||
          git config user.name "github-actions[bot]"
 | 
			
		||||
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
 | 
			
		||||
          git add .
 | 
			
		||||
          git commit -m "update README.md"
 | 
			
		||||
          git push
 | 
			
		||||
 | 
			
		||||
      - name: docker / push README.md to docker hub
 | 
			
		||||
        if: 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.IMAGE }}
 | 
			
		||||
          provider: dockerhub
 | 
			
		||||
          short_description: ${{ env.json_readme_description }}
 | 
			
		||||
          readme_file: 'README.md'
 | 
			
		||||
            --fail
 | 
			
		||||
@@ -89,4 +89,4 @@ volumes:
 | 
			
		||||
# 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. 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 Wed, 19 Feb 2025 10:11:48 GMT*
 | 
			
		||||
*created Fri, 21 Feb 2025 05:50:53 GMT*
 | 
			
		||||
@@ -1,2 +0,0 @@
 | 
			
		||||
### 🪄 Features
 | 
			
		||||
* add client IP to SQlite database
 | 
			
		||||
@@ -2,12 +2,13 @@ ARG APP_VERSION=stable
 | 
			
		||||
ARG APP_VERSION_PREFIX=""
 | 
			
		||||
ARG APP_VERSION_SUFFIX=""
 | 
			
		||||
 | 
			
		||||
# :: Build / templates
 | 
			
		||||
  FROM alpine/git AS templates
 | 
			
		||||
# :: Build / styles
 | 
			
		||||
  FROM alpine/git AS styles
 | 
			
		||||
  ARG APP_NO_CACHE
 | 
			
		||||
  RUN set -ex; \
 | 
			
		||||
    git clone https://github.com/CustomIcon/pykms-frontend.git; \
 | 
			
		||||
    git clone https://github.com/11notes/pykms-frontend.git; \
 | 
			
		||||
    cd /git/pykms-frontend; \
 | 
			
		||||
    git reset --hard 9e789a5;
 | 
			
		||||
    git reset --hard 103935b;
 | 
			
		||||
 | 
			
		||||
# :: Header
 | 
			
		||||
  FROM 11notes/kms:${APP_VERSION_PREFIX}${APP_VERSION}${APP_VERSION_SUFFIX}
 | 
			
		||||
@@ -60,12 +61,15 @@ ARG APP_VERSION_SUFFIX=""
 | 
			
		||||
 | 
			
		||||
  # :: add multi template option
 | 
			
		||||
    RUN set -ex; \
 | 
			
		||||
      mkdir -p ${APP_ROOT}/.default/templates/py-kms; \
 | 
			
		||||
      mkdir -p ${APP_ROOT}/.default/templates/custom-icon; \
 | 
			
		||||
      cp -R /opt/py-kms/templates/* ${APP_ROOT}/.default/templates/py-kms; \
 | 
			
		||||
      rm -rf /opt/py-kms/templates;
 | 
			
		||||
      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=templates /git/pykms-frontend/templates/ ${APP_ROOT}/.default/templates/custom-icon
 | 
			
		||||
    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; \
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										
											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: 108 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>
 | 
			
		||||
@@ -38,12 +38,6 @@ th {
 | 
			
		||||
            <p class="title">{{ count_clients_office }}</p>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="level-item has-text-centered">
 | 
			
		||||
        <div>
 | 
			
		||||
            <p class="heading">Products</p>
 | 
			
		||||
            <p class="title"><a href="/products">{{ count_projects }}</a></p>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</nav>
 | 
			
		||||
 | 
			
		||||
<hr>
 | 
			
		||||
 
 | 
			
		||||
@@ -8,15 +8,18 @@
 | 
			
		||||
 | 
			
		||||
    # apply correct style
 | 
			
		||||
    rm -rf /opt/py-kms/templates
 | 
			
		||||
    TEMPLATE_DIR=${APP_ROOT}/.default/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 /opt/py-kms/templates
 | 
			
		||||
        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 /opt/py-kms/templates
 | 
			
		||||
        eleven log info "using default 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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user