mirror of
https://github.com/11notes/docker-kms-gui.git
synced 2025-11-05 13:23:12 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6f69b4860 | ||
|
|
ed3ea34868 | ||
|
|
11cf777dbd | ||
|
|
70680a384b |
@@ -1,4 +1,5 @@
|
|||||||
.git*
|
.git*
|
||||||
*.md
|
*.md
|
||||||
|
img/
|
||||||
maintain/
|
maintain/
|
||||||
project*
|
project*
|
||||||
2
.json
2
.json
@@ -6,5 +6,5 @@
|
|||||||
"root":"/kms",
|
"root":"/kms",
|
||||||
|
|
||||||
"stable":"646f476",
|
"stable":"646f476",
|
||||||
"parent":"11notes/alpine:stable"
|
"parent":"11notes/kms:646f476"
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
**Activate any version of Windows and Office, forever**
|
**Activate any version of Windows and Office, forever**
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
# 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.
|
||||||
@@ -48,7 +48,7 @@ volumes:
|
|||||||
* [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:646f476](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)
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
### 🪄 Features
|
### 🪄 Features
|
||||||
* switch to new github workflow and build process
|
* remove truncation from clients.html
|
||||||
@@ -1,31 +1,7 @@
|
|||||||
# :: Util
|
ARG APP_VERSION=stable
|
||||||
FROM alpine/git AS util
|
|
||||||
|
|
||||||
ARG 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;
|
|
||||||
|
|
||||||
# :: Header
|
# :: Header
|
||||||
FROM 11notes/alpine:stable
|
FROM 11notes/kms:${APP_VERSION}
|
||||||
|
|
||||||
# :: arguments
|
# :: arguments
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
@@ -41,31 +17,27 @@
|
|||||||
ENV APP_ROOT=${APP_ROOT}
|
ENV APP_ROOT=${APP_ROOT}
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
# :: 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
|
||||||
|
|
||||||
# :: 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 and set correct permissions
|
||||||
@@ -75,9 +47,6 @@
|
|||||||
chown -R 1000:1000 \
|
chown -R 1000:1000 \
|
||||||
${APP_ROOT};
|
${APP_ROOT};
|
||||||
|
|
||||||
# :: 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
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
File diff suppressed because it is too large
Load Diff
91
rootfs/opt/py-kms/templates/clients.html
Normal file
91
rootfs/opt/py-kms/templates/clients.html
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
{% 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>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
{% if clients %}
|
||||||
|
<table class="table is-striped is-hoverable is-fullwidth">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Client ID</th>
|
||||||
|
<th>Machine Name</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.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,10 @@
|
|||||||
#!/bin/ash
|
#!/bin/ash
|
||||||
if [ -z "${1}" ]; then
|
if [ -z "${1}" ]; then
|
||||||
cd /opt/py-kms-gui
|
cd /opt/py-kms
|
||||||
set -- "gunicorn" \
|
set -- "gunicorn" \
|
||||||
--log-level INFO \
|
--log-level INFO \
|
||||||
pykms_WebUI:app
|
pykms_WebUI:app
|
||||||
|
|
||||||
eleven log start
|
eleven log start
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user