4 Commits

Author SHA1 Message Date
ElevenNotes
4b3005630d add custom KMS Database xml 2025-02-07 08:33:11 +01:00
ElevenNotes
6bd0fcdd8a add LICENSE 2025-02-07 08:21:02 +01:00
ElevenNotes
14fd52cc83 add LICENSE 2025-02-07 08:12:02 +01:00
ElevenNotes
58e32a5d1a drop ls 2025-02-06 18:27:54 +01:00
6 changed files with 1076 additions and 7 deletions

View File

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

View File

@@ -77,6 +77,7 @@ jobs:
APP_ROOT=${{ env.json_root }}
APP_UID=${{ env.IMAGE_UID }}
APP_GID=${{ env.IMAGE_GID }}
NO_CACHE=$(date +%s)
tags: |
${{ env.json_image }}:grype
@@ -122,6 +123,7 @@ jobs:
APP_ROOT=${{ env.json_root }}
APP_UID=${{ env.IMAGE_UID }}
APP_GID=${{ env.IMAGE_GID }}
NO_CACHE=$(date +%s)
tags: |
${{ env.IMAGE_TAGS }}

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,9 +1,9 @@
# :: Util
FROM alpine AS util
FROM alpine/git AS util
ARG NO_CACHE
RUN set -ex; \
apk --no-cache --update add \
git; \
git clone https://github.com/11notes/docker-util.git;
# :: Build / redis
@@ -41,11 +41,14 @@
ENV APP_ROOT=${APP_ROOT}
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
# :: multi-stage
COPY --from=util /docker-util/src/ /usr/local/bin
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
# :: Run
USER root
@@ -60,6 +63,8 @@
RUN set -ex; \
mkdir -p ${APP_ROOT}/var; \
cd /opt/py-kms-gui; \
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;
@@ -74,7 +79,7 @@
VOLUME ["${APP_ROOT}/var"]
# :: Monitor
HEALTHCHECK --interval=5s --timeout=2s CMD curl -X GET -kILs --fail http://localhost:${PORT} || exit 1
HEALTHCHECK --interval=5s --timeout=2s CMD curl -X GET -kILs --fail http://localhost:${PORT}/livez || exit 1
# :: Start
USER docker

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,10 @@
#!/bin/ash
if [ -z "${1}" ]; then
cd /opt/py-kms-gui
ls -lah
set -- "gunicorn" \
--log-level INFO \
pykms_WebUI:app
eleven log start
fi