clone

a browser-first diagram editor with live svg previews, local drafts and encrypted, accountless sharing

remove upstream Kroki repository scaffolding

Dami committed c5417e6
commit
c5417e62ec7026193fa0bf19ece477830b3f31dc
parent
eb656be584a9d31063c2036a2f529b5755ce6e4b
author
Dami <dami.etoile@gmail.com>
17 files changed, +0 -1390
D.github/FUNDING.yml1-
D.github/workflows/cve-scan.yml24--
D.github/workflows/dockerhub-description.yml60------
D.github/workflows/docs-ci.yml124------------
D.github/workflows/docs-notify.yml22--
D.github/workflows/main.yaml280----------------------------
D.github/workflows/mermaid-ci.yaml39----
D.github/workflows/nightly.yaml14-
D.github/workflows/release.yml300------------------------------
DCLAUDE.md5-
DDOCKERHUB-COMPANION.md21--
DDOCKERHUB.md79--------
DLICENSE21--
DSECURITY.md9-
Ddocker-bake-release.hcl22--
Ddocker-bake.hcl103----------
Drenovate.json5266---------------------------
D .github/FUNDING.yml +0 -1
@@ -1 +0,0 @@
1-github: mogztter
D .github/workflows/cve-scan.yml +0 -24
D .github/workflows/dockerhub-description.yml +0 -60
@@ -1,60 +0,0 @@
1-name: Docker Hub Description2-on:3- workflow_dispatch:4- push:5- tags:6- - 'v*'7- - .github/workflows/dockerhub-description.yml8-permissions:9- contents: read10-jobs:11- docker-hub-description:12- runs-on: ubuntu-latest13- steps:14- - uses: actions/checkout@v7.0.115-16- - name: Docker Hub Description17- uses: peter-evans/dockerhub-description@v5.0.018- with:19- username: ${{ secrets.DOCKER_USERNAME }}20- password: ${{ secrets.DOCKER_PASSWORD }}21- repository: yuzutech/kroki22- short-description: ${{ github.event.repository.description }}23- readme-filepath: ./DOCKERHUB.md24-25- - name: Docker Hub Description - bpmn26- uses: peter-evans/dockerhub-description@v5.0.027- with:28- username: ${{ secrets.DOCKER_USERNAME }}29- password: ${{ secrets.DOCKER_PASSWORD }}30- repository: yuzutech/kroki-bpmn31- short-description: Companion server for Kroki that provides BPMN32- readme-filepath: ./DOCKERHUB-COMPANION.md33-34- - name: Docker Hub Description - excalidraw35- uses: peter-evans/dockerhub-description@v5.0.036- with:37- username: ${{ secrets.DOCKER_USERNAME }}38- password: ${{ secrets.DOCKER_PASSWORD }}39- repository: yuzutech/kroki-excalidraw40- short-description: Companion server for Kroki that provides Excalidraw41- readme-filepath: ./DOCKERHUB-COMPANION.md42-43- - name: Docker Hub Description - mermaid44- uses: peter-evans/dockerhub-description@v5.0.045- with:46- username: ${{ secrets.DOCKER_USERNAME }}47- password: ${{ secrets.DOCKER_PASSWORD }}48- repository: yuzutech/kroki-mermaid49- short-description: Companion server for Kroki that provides Mermaid50- readme-filepath: ./DOCKERHUB-COMPANION.md51-52- - name: Docker Hub Description - diagramsnet53- uses: peter-evans/dockerhub-description@v5.0.054- with:55- username: ${{ secrets.DOCKER_USERNAME }}56- password: ${{ secrets.DOCKER_PASSWORD }}57- repository: yuzutech/kroki-diagramsnet58- short-description: Companion server for Kroki that provides diagrams.net (formerly draw.io)59- readme-filepath: ./DOCKERHUB-COMPANION.md60-
D .github/workflows/docs-ci.yml +0 -124
@@ -1,124 +0,0 @@
1-name: Docs CI2-3-on:4- push:5- paths:6- - 'docs/**'7- branches:8- - main9- pull_request:10- paths:11- - 'docs/**'12- branches:13- - '*'14- workflow_dispatch:15-16-permissions:17- contents: read18-19-jobs:20- test-kind-multipod:21- runs-on: ubuntu-latest22-23- steps:24- - uses: actions/checkout@v725- - name: Install Kubernetes Kind26- run: |27- curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64"28- chmod +x ./kind29- ./kind version30-31- - name: Install kubectl32- run: |33- curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.21.3/bin/linux/amd64/kubectl34- chmod +x ./kubectl35-36- - name: Create cluster37- run: ./kind create cluster38-39- - name: Install Kroki using Multiple Pods40- run: ./kubectl apply -f docs/modules/setup/examples/k8s-multi-pod41-42- - name: Kubectl version43- run: ./kubectl version44-45- - name: Wait until available46- run: ./kubectl wait --for=condition=available --timeout=120s --all deployments.apps47-48- - name: Check pod49- run: ./kubectl get pod50-51- - name: Forward port 8000 (background)52- run: ./kubectl port-forward service/kroki 8000:8000 &53-54- - name: Test SeqDiag55- run: curl -o /dev/null -s -w "%{http_code}\n" http://localhost:8000/seqdiag/svg/eNorTi1MyUxMV6jmUlBIKsovL04tUtC1UyhPTQKyyoCc6JzEpNQcBVsFJXfXEAX9zLyU1Aq9jJLcHKVYayQ9Nrq6CE3WhA0L8A8GmpaUk5-un5yfm5uaVwIxD6EWqDElsSQxKbE4FUmfp1-wa1CIAg49IFfANOFxXS0A68hQUg== | grep 20056-57- - name: Uninstall Kroki58- run: ./kubectl delete -f docs/modules/setup/examples/k8s-multi-pod59-60- - name: Delete cluster61- run: ./kind delete cluster62-63- test-kind-singlepod:64- runs-on: ubuntu-latest65-66- steps:67- - uses: actions/checkout@v768- - name: Install Kubernetes Kind69- run: |70- curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64"71- chmod +x ./kind72- ./kind version73-74- - name: Install kubectl75- run: |76- curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.21.3/bin/linux/amd64/kubectl77- chmod +x ./kubectl78-79- - name: Create cluster80- run: ./kind create cluster81-82- - name: Install Kroki using a Single Pod83- run: ./kubectl apply -f docs/modules/setup/examples/k8s-single-pod84-85- - name: Kubectl version86- run: ./kubectl version87-88- - name: Wait until available89- run: ./kubectl wait --for=condition=available --timeout=120s --all deployments.apps90-91- - name: Check pod92- run: ./kubectl get pod93-94- - name: Forward port 8000 (background)95- run: ./kubectl port-forward service/kroki 8000:8000 &96-97- - name: Test SeqDiag98- run: curl -o /dev/null -s -w "%{http_code}\n" http://localhost:8000/seqdiag/svg/eNorTi1MyUxMV6jmUlBIKsovL04tUtC1UyhPTQKyyoCc6JzEpNQcBVsFJXfXEAX9zLyU1Aq9jJLcHKVYayQ9Nrq6CE3WhA0L8A8GmpaUk5-un5yfm5uaVwIxD6EWqDElsSQxKbE4FUmfp1-wa1CIAg49IFfANOFxXS0A68hQUg== | grep 20099-100- - name: Uninstall Kroki101- run: ./kubectl delete -f docs/modules/setup/examples/k8s-single-pod102-103- - name: Delete cluster104- run: ./kind delete cluster105-106- test-dockercompose:107- runs-on: ubuntu-latest108-109- steps:110- - uses: actions/checkout@v7111- - name: Setup Docker112- # taken from https://github.com/docker/github-actions/blob/0f18e2abad9a4ac2963d2516246787375b5ec917/Dockerfile#L32113- run: curl -fL https://download.docker.com/linux/static/stable/x86_64/docker-20.10.21.tgz | tar xzO docker/docker > docker && sudo mv -f docker /usr/bin/docker && sudo chmod +x /usr/bin/docker114-115- - name: docker-compose up116- run: docker compose -f docs/modules/setup/examples/kroki-docker-compose.yml up -d117-118- - name: Wait until available119- run: |120- ./ci/tests/wait-for-it.sh localhost:8000 --timeout=40121- sleep 20122-123- - name: Test SeqDiag124- run: curl -o /dev/null -s -w "%{http_code}\n" http://localhost:8000/seqdiag/svg/eNorTi1MyUxMV6jmUlBIKsovL04tUtC1UyhPTQKyyoCc6JzEpNQcBVsFJXfXEAX9zLyU1Aq9jJLcHKVYayQ9Nrq6CE3WhA0L8A8GmpaUk5-un5yfm5uaVwIxD6EWqDElsSQxKbE4FUmfp1-wa1CIAg49IFfANOFxXS0A68hQUg== | grep 200
D .github/workflows/docs-notify.yml +0 -22
D .github/workflows/main.yaml +0 -280
@@ -1,280 +0,0 @@
1-name: CI2-3-on:4- push:5- paths-ignore:6- - 'docs/**'7- branches:8- - main9- pull_request:10- paths-ignore:11- - 'docs/**'12- branches:13- - '*'14- workflow_call:15- inputs:16- build_multiarch:17- default: false18- required: true19- type: boolean20-21-permissions:22- contents: read23-24-jobs:25- test-containers:26- runs-on: ubuntu-24.0427- steps:28- - uses: actions/checkout@v729- 30- - name: Free up disk space31- #if: ${{ inputs.build_multiarch }}32- shell: bash33- # workaround: https://github.com/jlumbroso/free-disk-space/issues/934- # copied from https://github.com/hirnidrin/free-disk-space/blob/4bacba7c412c8ace26b87b5b79977da05137e69d/action.yml35- run: |36- # ======37- # MACROS38- # ======39- 40- # macro to print a line of equals41- # (silly but works)42- printSeparationLine() {43- str=${1:=}44- num=${2:-80}45- counter=146- output=""47- while [ $counter -le $num ]48- do49- output="${output}${str}"50- counter=$((counter+1))51- done52- echo "${output}"53- }54- 55- # macro to compute available space56- # REF: https://unix.stackexchange.com/a/42049/6084957- # REF: https://stackoverflow.com/a/450821/40873458- getAvailableSpace() { echo $(df -a $1 | awk 'NR > 1 {avail+=$4} END {print avail}'); }59- 60- # macro to make Kb human readable (assume the input is Kb)61- # REF: https://unix.stackexchange.com/a/44087/6084962- formatByteCount() { echo $(numfmt --to=iec-i --suffix=B --padding=7 $1'000'); }63- 64- # macro to output saved space65- printSavedSpace() {66- saved=${1}67- title=${2:-}68- 69- echo ""70- printSeparationLine '*' 8071- if [ ! -z "${title}" ]; then72- echo "=> ${title}: Saved $(formatByteCount $saved)"73- else74- echo "=> Saved $(formatByteCount $saved)"75- fi76- printSeparationLine '*' 8077- echo ""78- }79- 80- # macro to print output of dh with caption81- printDH() {82- caption=${1:-}83- 84- printSeparationLine '=' 8085- echo "${caption}"86- echo ""87- echo "$ dh -h /"88- echo ""89- df -h /90- echo "$ dh -a /"91- echo ""92- df -a /93- echo "$ dh -a"94- echo ""95- df -a96- printSeparationLine '=' 8097- }98-99- # ======100- # SCRIPT101- # ======102- 103- # Display initial disk space stats104- 105- AVAILABLE_INITIAL=$(getAvailableSpace)106- AVAILABLE_ROOT_INITIAL=$(getAvailableSpace '/')107- 108- printDH "BEFORE CLEAN-UP:"109- echo ""110- 111- # Remove Android library112- BEFORE=$(getAvailableSpace)113-114- sudo rm -rf /usr/local/lib/android115-116- AFTER=$(getAvailableSpace)117- SAVED=$((AFTER-BEFORE))118- printSavedSpace $SAVED "Android library"119- 120- BEFORE=$(getAvailableSpace)121-122- # https://github.community/t/bigger-github-hosted-runners-disk-space/17267/11123- sudo rm -rf /usr/share/dotnet124-125- AFTER=$(getAvailableSpace)126- SAVED=$((AFTER-BEFORE))127- printSavedSpace $SAVED ".NET runtime"128- 129- BEFORE=$(getAvailableSpace)130-131- sudo rm -rf /opt/ghc132-133- AFTER=$(getAvailableSpace)134- SAVED=$((AFTER-BEFORE))135- printSavedSpace $SAVED "Haskell runtime"136- 137- # Remove large packages138- # REF: https://github.com/apache/flink/blob/master/tools/azure-pipelines/free_disk_space.sh139- 140- BEFORE=$(getAvailableSpace)141-142- sudo apt-get remove -y '^aspnetcore-.*'143- sudo apt-get remove -y '^dotnet-.*'144- sudo apt-get remove -y '^llvm-.*'145- sudo apt-get remove -y 'php.*'146- sudo apt-get remove -y '^mongodb-.*'147- sudo apt-get remove -y '^mysql-.*'148- sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri149- sudo apt-get autoremove -y150- sudo apt-get clean151-152- AFTER=$(getAvailableSpace)153- SAVED=$((AFTER-BEFORE))154- printSavedSpace $SAVED "Large misc. packages"155- 156- # Remove Docker images157- BEFORE=$(getAvailableSpace)158-159- sudo docker image prune --all --force160-161- AFTER=$(getAvailableSpace)162- SAVED=$((AFTER-BEFORE))163- printSavedSpace $SAVED "Docker images"164-165- # Remove Swap storage166- BEFORE=$(getAvailableSpace)167-168- sudo swapoff -a169- sudo rm -f /mnt/swapfile170- free -h171-172- AFTER=$(getAvailableSpace)173- SAVED=$((AFTER-BEFORE))174- printSavedSpace $SAVED "Swap storage"175- 176- # Output saved space statistic177- 178- AVAILABLE_END=$(getAvailableSpace)179- AVAILABLE_ROOT_END=$(getAvailableSpace '/')180- 181- echo ""182- printDH "AFTER CLEAN-UP:"183- 184- echo ""185- echo ""186- 187- echo "/dev/root:"188- printSavedSpace $((AVAILABLE_ROOT_END - AVAILABLE_ROOT_INITIAL))189- echo "overall:"190- printSavedSpace $((AVAILABLE_END - AVAILABLE_INITIAL))191-192- - name: Install GraphViz193- run: sudo apt-get update && sudo apt-get install graphviz -y194-195- - name: Set up JDK 21196- uses: actions/setup-java@v5197- with:198- java-version: 21199- distribution: temurin200-201- - name: Install Task202- uses: go-task/setup-task@v2203- with:204- version: 3.x205- repo-token: ${{ secrets.GITHUB_TOKEN }}206-207- - name: Set up Node.js 24208- uses: actions/setup-node@v7209- with:210- node-version: 24211-212- - name: Install Node dependencies213- run: npm ci214-215- - name: Test diagram.zip persistence API216- working-directory: diagramzip-api217- run: |218- npm ci219- npm run cf-typegen220- npm run check221- npm test222- npx wrangler deploy --dry-run223-224- - name: Test diagram.zip rendering gateway225- working-directory: diagramzip-render226- run: |227- npm ci228- npm run cf-typegen229- npm run check230- npm test231- npm run deploy:dry232-233- - name: Test and build diagram.zip234- run: |235- npm run test:diagramzip236- npm run build:diagramzip237- git diff --exit-code -- server/src/main/resources/web/diagramzip238-239- - name: Build Java server240- run: task mavenBuild241-242- - name: Set up QEMU243- if: ${{ inputs.build_multiarch }}244- uses: docker/setup-qemu-action@v4245-246- - name: Set up Docker Buildx247- uses: docker/setup-buildx-action@v4248- with:249- version: 'v0.36.0'250- buildkitd-config-inline: |251- [worker.oci]252- max-parallelism = 2253-254- - name: Cache Docker layers255- uses: actions/cache@v6256- with:257- path: /tmp/.buildx-cache258- key: ${{ runner.os }}-buildx-${{ github.sha }}259- restore-keys: |260- ${{ runner.os }}-buildx-261-262- - name: Build container images263- run: task dockerBuildImages264- env:265- BUILD_MULTIARCH: ${{ inputs.build_multiarch }}266- # one cache subdirectory per bake target, see docker-bake.hcl267- CACHE_FROM_DIR: '/tmp/.buildx-cache'268- CACHE_TO_DIR: '/tmp/.buildx-cache-new'269-270- - name: Run smoke tests271- run: task smokeTests272-273- # This ugly bit is necessary if you don't want your cache to grow forever until it hits GitHub's limit of 5GB.274- # Temp fix275- # https://github.com/docker/build-push-action/issues/252276- # https://github.com/moby/buildkit/issues/1896277- - name: Move cache278- run: |279- rm -rf /tmp/.buildx-cache280- mv /tmp/.buildx-cache-new /tmp/.buildx-cache
D .github/workflows/mermaid-ci.yaml +0 -39
D .github/workflows/nightly.yaml +0 -14
D .github/workflows/release.yml +0 -300
@@ -1,300 +0,0 @@
1-name: Release2-run-name: Release v${{ inputs.release_version }} by ${{ github.actor }}3-4-on:5- workflow_dispatch:6- inputs:7- release_version:8- description: 'Release version'9- required: true10- type: string11- create_tag:12- description: 'Create a tag'13- required: false14- default: false15- type: boolean16- create_gh_release:17- description: 'Create a GitHub release'18- required: false19- default: false20- type: boolean21- publish_dockerhub:22- description: 'Publish to Docker Hub'23- required: false24- default: true25- type: boolean26-27-permissions:28- contents: write29-30-jobs:31- release:32- runs-on: ubuntu-24.0433- steps:34- - uses: actions/checkout@v735- with:36- # When create_tag is unchecked, the tag must already exist (retry of a37- # failed release): build from it so the artifacts match the tag even if38- # the branch has moved since.39- ref: ${{ inputs.create_tag && github.ref || format('v{0}', inputs.release_version) }}40- - name: Install GraphViz41- run: sudo apt-get update && sudo apt-get install graphviz -y42- - name: Set up JDK 2143- uses: actions/setup-java@v544- with:45- java-version: 2146- distribution: temurin47- - name: Install Task48- uses: go-task/setup-task@v249- with:50- version: 3.x51- repo-token: ${{ secrets.GITHUB_TOKEN }}52- - name: Tag, commit and push53- if: ${{ inputs.create_tag }}54- run: |55- task mavenSetVersion56- node ci/tasks/changelog.js release "$RELEASE_VERSION"57-58- RELEASE_GIT_NAME=$(curl -s https://api.github.com/users/$GITHUB_ACTOR | jq -r .name)59- RELEASE_GIT_EMAIL=$RELEASE_USER@users.noreply.github.com60-61- git config --local user.name "$RELEASE_GIT_NAME"62- git config --local user.email "$RELEASE_GIT_EMAIL"63-64- git commit -a -m "Release $RELEASE_VERSION"65- git tag "v$RELEASE_VERSION"66- git push origin "$BRANCH_NAME"67- git push origin "v$RELEASE_VERSION"68- env:69- RELEASE_VERSION: ${{ inputs.release_version }}70- BRANCH_NAME: ${{ github.head_ref || github.ref_name }}71- - name: Build Java server72- run: task mavenBuild73- - run: echo "RELEASE_VERSION=v$RELEASE_VERSION" >> $GITHUB_ENV74- env:75- RELEASE_VERSION: ${{ inputs.release_version }}76- - name: Generate checksums77- run: |78- cp kroki-server.jar kroki-standalone-server-${{ env.RELEASE_VERSION }}.jar79- sha512sum kroki-standalone-server-${{ env.RELEASE_VERSION }}.jar > kroki-standalone-server-${{ env.RELEASE_VERSION }}.sha512sum.txt80- md5sum kroki-standalone-server-${{ env.RELEASE_VERSION }}.jar > kroki-standalone-server-${{ env.RELEASE_VERSION }}.md5sum.txt81- working-directory: server/target82- - name: Create release83- if: ${{ inputs.create_gh_release }}84- run: |85- if ! gh release view "$RELEASE_VERSION" > /dev/null 2>&1; then86- node ci/tasks/changelog.js notes "${RELEASE_VERSION#v}" > release-notes.md87- gh release create "$RELEASE_VERSION" \88- --title "$RELEASE_VERSION" \89- --notes-file release-notes.md \90- --generate-notes91- fi92- gh release upload "$RELEASE_VERSION" ./server/target/kroki-standalone-server-* --clobber93- env:94- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}95- publish_dockerhub:96- runs-on: ubuntu-24.0497- needs: release98- if: ${{ inputs.publish_dockerhub }}99- steps:100- - name: Free up disk space101- shell: bash102- # workaround: https://github.com/jlumbroso/free-disk-space/issues/9103- # copied from https://github.com/hirnidrin/free-disk-space/blob/4bacba7c412c8ace26b87b5b79977da05137e69d/action.yml104- run: |105- # ======106- # MACROS107- # ======108- 109- # macro to print a line of equals110- # (silly but works)111- printSeparationLine() {112- str=${1:=}113- num=${2:-80}114- counter=1115- output=""116- while [ $counter -le $num ]117- do118- output="${output}${str}"119- counter=$((counter+1))120- done121- echo "${output}"122- }123- 124- # macro to compute available space125- # REF: https://unix.stackexchange.com/a/42049/60849126- # REF: https://stackoverflow.com/a/450821/408734127- getAvailableSpace() { echo $(df -a $1 | awk 'NR > 1 {avail+=$4} END {print avail}'); }128- 129- # macro to make Kb human readable (assume the input is Kb)130- # REF: https://unix.stackexchange.com/a/44087/60849131- formatByteCount() { echo $(numfmt --to=iec-i --suffix=B --padding=7 $1'000'); }132- 133- # macro to output saved space134- printSavedSpace() {135- saved=${1}136- title=${2:-}137- 138- echo ""139- printSeparationLine '*' 80140- if [ ! -z "${title}" ]; then141- echo "=> ${title}: Saved $(formatByteCount $saved)"142- else143- echo "=> Saved $(formatByteCount $saved)"144- fi145- printSeparationLine '*' 80146- echo ""147- }148- 149- # macro to print output of dh with caption150- printDH() {151- caption=${1:-}152- 153- printSeparationLine '=' 80154- echo "${caption}"155- echo ""156- echo "$ dh -h /"157- echo ""158- df -h /159- echo "$ dh -a /"160- echo ""161- df -a /162- echo "$ dh -a"163- echo ""164- df -a165- printSeparationLine '=' 80166- }167- 168- # ======169- # SCRIPT170- # ======171- 172- # Display initial disk space stats173- 174- AVAILABLE_INITIAL=$(getAvailableSpace)175- AVAILABLE_ROOT_INITIAL=$(getAvailableSpace '/')176- 177- printDH "BEFORE CLEAN-UP:"178- echo ""179- 180- # Remove Android library181- BEFORE=$(getAvailableSpace)182- 183- sudo rm -rf /usr/local/lib/android184- 185- AFTER=$(getAvailableSpace)186- SAVED=$((AFTER-BEFORE))187- printSavedSpace $SAVED "Android library"188- 189- BEFORE=$(getAvailableSpace)190- 191- # https://github.community/t/bigger-github-hosted-runners-disk-space/17267/11192- sudo rm -rf /usr/share/dotnet193- 194- AFTER=$(getAvailableSpace)195- SAVED=$((AFTER-BEFORE))196- printSavedSpace $SAVED ".NET runtime"197- 198- BEFORE=$(getAvailableSpace)199- 200- sudo rm -rf /opt/ghc201- 202- AFTER=$(getAvailableSpace)203- SAVED=$((AFTER-BEFORE))204- printSavedSpace $SAVED "Haskell runtime"205- 206- # Remove large packages207- # REF: https://github.com/apache/flink/blob/master/tools/azure-pipelines/free_disk_space.sh208- 209- BEFORE=$(getAvailableSpace)210- 211- sudo apt-get remove -y '^aspnetcore-.*'212- sudo apt-get remove -y '^dotnet-.*'213- sudo apt-get remove -y '^llvm-.*'214- sudo apt-get remove -y 'php.*'215- sudo apt-get remove -y '^mongodb-.*'216- sudo apt-get remove -y '^mysql-.*'217- sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri218- sudo apt-get autoremove -y219- sudo apt-get clean220- 221- AFTER=$(getAvailableSpace)222- SAVED=$((AFTER-BEFORE))223- printSavedSpace $SAVED "Large misc. packages"224- 225- # Remove Docker images226- BEFORE=$(getAvailableSpace)227- 228- sudo docker image prune --all --force229- 230- AFTER=$(getAvailableSpace)231- SAVED=$((AFTER-BEFORE))232- printSavedSpace $SAVED "Docker images"233- 234- # Remove Swap storage235- BEFORE=$(getAvailableSpace)236- 237- sudo swapoff -a238- sudo rm -f /mnt/swapfile239- free -h240- 241- AFTER=$(getAvailableSpace)242- SAVED=$((AFTER-BEFORE))243- printSavedSpace $SAVED "Swap storage"244- 245- # Output saved space statistic246- 247- AVAILABLE_END=$(getAvailableSpace)248- AVAILABLE_ROOT_END=$(getAvailableSpace '/')249- 250- echo ""251- printDH "AFTER CLEAN-UP:"252- 253- echo ""254- echo ""255- 256- echo "/dev/root:"257- printSavedSpace $((AVAILABLE_ROOT_END - AVAILABLE_ROOT_INITIAL))258- echo "overall:"259- printSavedSpace $((AVAILABLE_END - AVAILABLE_INITIAL))260- - run: echo "RELEASE_VERSION=v$RELEASE_VERSION" >> $GITHUB_ENV261- env:262- RELEASE_VERSION: ${{ inputs.release_version }}263- - uses: actions/checkout@v7264- with:265- ref: ${{ env.RELEASE_VERSION }}266- - name: Install GraphViz267- run: sudo apt-get update && sudo apt-get install graphviz -y268- - name: Set up JDK 21269- uses: actions/setup-java@v5270- with:271- java-version: 21272- distribution: temurin273- - name: Install Task274- uses: go-task/setup-task@v2275- with:276- version: 3.x277- repo-token: ${{ secrets.GITHUB_TOKEN }}278- - name: Build Java server279- run: task mavenBuild280- - name: Set up QEMU281- uses: docker/setup-qemu-action@v4282- - name: Set up Docker Buildx283- uses: docker/setup-buildx-action@v4284- with:285- buildkitd-config: .github/buildkitd.toml286- - name: Login to Docker Hub287- run: |288- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin289- env:290- DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}291- DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}292- - if: github.event_name == 'workflow_dispatch'293- name: Publish Docker images ${{ inputs.release_version }}294- run: task dockerPublishImages295- env:296- RELEASE_VERSION: ${{ inputs.release_version }}297- - if: github.event_name == 'push'298- run: |299- export RELEASE_VERSION=${GITHUB_REF#refs/*/v*}300- task dockerPublishImages
D CLAUDE.md +0 -5
D DOCKERHUB-COMPANION.md +0 -21
D DOCKERHUB.md +0 -79
@@ -1,79 +0,0 @@
1-# Kroki2-3-Convert plain text diagrams to images !4-5-Kroki provides a unified API with support for BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag, PacketDiag, RackDiag), BPMN, Bytefield, C4 (with PlantUML), D2, DBML, Ditaa, Erd, Excalidraw, GoAT, GraphViz, Mermaid, Nomnoml, Pikchr, PlantUML, SvgBob, Symbolator, UMLet, Vega, Vega-Lite, WaveDrom... and more to come!6-7-## Getting Started8-9-### Prerequisites10-11-In order to run this container you'll need docker installed.12-13-* [Windows](https://docs.docker.com/docker-for-windows/)14-* [OS X](https://docs.docker.com/docker-for-mac/)15-* [Linux](https://docs.docker.com/get-started/)16-17-### Usage18-19-See also the [installation](https://docs.kroki.io/kroki/setup/configuration/) docs in the [Kroki documentation](https://docs.kroki.io/)20-21-#### start a kroki instance22-23- $ docker run --name some-kroki -d yuzutech/kroki24-25-This image includes `EXPOSE 8000` (the kroki port), so standard container linking will make it automatically available to the linked containers. If you want to map port 8000 in the container to a port on your host, please use the `--publish` or `-p` flag:26-27- $ docker run -p8000:8000 --name some-kroki -d yuzutech/kroki28-29-#### connect with companion containers30-31-We recommend using docker-composer to connect with companion containers, such as 32-[kroki-bpmn](https://hub.docker.com/r/yuzutech/kroki-bpmn), [kroki-excalidraw](https://hub.docker.com/r/yuzutech/kroki-excalidraw) and [kroki-mermaid](https://hub.docker.com/r/yuzutech/kroki-mermaid)33-```34-services:35- core:36- image: yuzutech/kroki37- environment:38- - KROKI_MERMAID_HOST=mermaid39- - KROKI_BPMN_HOST=bpmn40- - KROKI_EXCALIDRAW_HOST=excalidraw41- ports:42- - "8000:8000"43- mermaid:44- image: yuzutech/kroki-mermaid45- ports:46- - "8002:8002"47- bpmn:48- image: yuzutech/kroki-bpmn49- ports:50- - "8003:8003"51- excalidraw:52- image: yuzutech/kroki-excalidraw53- ports:54- - "8004:8004"55-```56-57-If you don't want to use `docker-compose`, you can configure the host and port for each companion container using environment variables:58-59-| Container | Host | Port |60-|--------------------|-------------------------|-------------------------|61-| `kroki-mermaid` | `KROKI_MERMAID_HOST` | `KROKI_MERMAID_PORT` |62-| `kroki-bpmn` | `KROKI_BPMN_HOST` | `KROKI_BPMN_PORT` |63-| `kroki-excalidraw` | `KROKI_EXCALIDRAW_HOST` | `KROKI_EXCALIDRAW_PORT` |64-65-For Kubernetes installation follow the description in [install using Kubernetes](https://docs.kroki.io/kroki/setup/install/#_using_kubernetes) section.66-67-### Environment Variables68-69-The Kroki image uses several environment variables. While none of the variables are required, they may significantly aid you in using the image.70-71-See the [configuration](https://docs.kroki.io/kroki/setup/configuration/) docs in the [Kroki documentation](https://docs.kroki.io/)72-73-## Versioning74-75-We use [SemVer](https://semver.org/) for versioning.76-77-## License78-79-This project is licensed under the MIT License.
D LICENSE +0 -21
D SECURITY.md +0 -9
D docker-bake-release.hcl +0 -22
D docker-bake.hcl +0 -103
@@ -1,103 +0,0 @@
1-variable "TAG" {2- default = "latest"3-}4-5-# Each target must use its own cache directory: concurrent cache exports6-# to the same local directory race in the ingest area and fail with7-# "error writing layer blob: rename tmp file ... no such file or directory".8-variable "CACHE_FROM_DIR" {9- default = ""10-}11-12-variable "CACHE_TO_DIR" {13- default = ""14-}15-16-group "companion-images" {17- targets = ["kroki-mermaid", "kroki-bpmn", "kroki-excalidraw", "kroki-diagramsnet"]18-}19-20-target "oci-labels" {21- labels = {22- "org.opencontainers.image.description" = "Kroki provides a unified API supporting multiple diagramming formats, making it easy to create diagrams from textual descriptions."23- "org.opencontainers.image.url" = "https://kroki.io"24- "org.opencontainers.image.source" = "https://github.com/yuzutech/kroki"25- "org.opencontainers.image.licenses" = "MIT"26- }27-}28-29-target "kroki" {30- context = "server"31- contexts = {32- nomnoml = "./nomnoml"33- vega = "./vega"34- dbml = "./dbml"35- wavedrom = "./wavedrom"36- bytefield = "./bytefield"37- tikz = "./tikz"38- }39- dockerfile = "ops/docker/Dockerfile"40- tags = ["yuzutech/kroki:${TAG}"]41- cache-from = CACHE_FROM_DIR != "" ? ["type=local,src=${CACHE_FROM_DIR}/kroki"] : []42- cache-to = CACHE_TO_DIR != "" ? ["type=local,dest=${CACHE_TO_DIR}/kroki"] : []43- inherits = ["oci-labels"]44- labels = {45- "org.opencontainers.image.title" = "Kroki"46- }47-}48-49-target "kroki-mermaid" {50- context = "mermaid"51- contexts = {52- lib = "./lib/browser-instance"53- }54- tags = ["yuzutech/kroki-mermaid:${TAG}"]55- cache-from = CACHE_FROM_DIR != "" ? ["type=local,src=${CACHE_FROM_DIR}/mermaid"] : []56- cache-to = CACHE_TO_DIR != "" ? ["type=local,dest=${CACHE_TO_DIR}/mermaid"] : []57- inherits = ["oci-labels"]58- labels = {59- "org.opencontainers.image.title" = "Kroki - Mermaid"60- }61-}62-63-target "kroki-bpmn" {64- context = "bpmn"65- contexts = {66- lib = "./lib/browser-instance"67- }68- tags = ["yuzutech/kroki-bpmn:${TAG}"]69- cache-from = CACHE_FROM_DIR != "" ? ["type=local,src=${CACHE_FROM_DIR}/bpmn"] : []70- cache-to = CACHE_TO_DIR != "" ? ["type=local,dest=${CACHE_TO_DIR}/bpmn"] : []71- inherits = ["oci-labels"]72- labels = {73- "org.opencontainers.image.title" = "Kroki - BPMN"74- }75-}76-77-target "kroki-excalidraw" {78- context = "excalidraw"79- contexts = {80- lib = "./lib/browser-instance"81- }82- tags = ["yuzutech/kroki-excalidraw:${TAG}"]83- cache-from = CACHE_FROM_DIR != "" ? ["type=local,src=${CACHE_FROM_DIR}/excalidraw"] : []84- cache-to = CACHE_TO_DIR != "" ? ["type=local,dest=${CACHE_TO_DIR}/excalidraw"] : []85- inherits = ["oci-labels"]86- labels = {87- "org.opencontainers.image.title" = "Kroki - Excalidraw"88- }89-}90-91-target "kroki-diagramsnet" {92- context = "diagrams.net"93- contexts = {94- lib = "./lib/browser-instance"95- }96- tags = ["yuzutech/kroki-diagramsnet:${TAG}"]97- cache-from = CACHE_FROM_DIR != "" ? ["type=local,src=${CACHE_FROM_DIR}/diagramsnet"] : []98- cache-to = CACHE_TO_DIR != "" ? ["type=local,dest=${CACHE_TO_DIR}/diagramsnet"] : []99- inherits = ["oci-labels"]100- labels = {101- "org.opencontainers.image.title" = "Kroki - diagrams.net"102- }103-}
D renovate.json5 +0 -266
@@ -1,266 +0,0 @@
1-{2- $schema: 'https://docs.renovatebot.com/renovate-schema.json',3- dependencyDashboard: true,4- // the server/pom.xml <parent> points at this repo's own root pom.xml,5- // it's never published so Renovate can't (and shouldn't) look it up6- ignoreDeps: [7- 'io.kroki:kroki',8- ],9- labels: [10- '🔗 dependencies',11- ],12- separateMajorMinor: true,13- // wait at least 7 days after a release before proposing it14- minimumReleaseAge: '7 days',15- // batch all PRs on monday morning instead of creating them continuously16- timezone: 'Europe/Paris',17- schedule: [18- 'before 6am on monday',19- ],20- // major updates wait for manual approval from the dependency dashboard21- major: {22- dependencyDashboardApproval: true,23- },24- // avoid PR bursts and cascading rebases25- prConcurrentLimit: 5,26- prHourlyLimit: 2,27- extends: [28- ':preserveSemverRanges',29- ],30- // security fixes should not wait31- vulnerabilityAlerts: {32- minimumReleaseAge: null,33- },34- // PLANTUML_VERSION is a plain ARG (not a FROM tag) used to download the native35- // PlantUML binary, so it needs a custom manager to be tracked at all36- customManagers: [37- {38- customType: 'regex',39- managerFilePatterns: [40- '/^server/ops/docker/Dockerfile$/',41- ],42- matchStrings: [43- 'ARG PLANTUML_VERSION="(?<currentValue>.*?)"',44- ],45- datasourceTemplate: 'github-releases',46- depNameTemplate: 'plantuml/plantuml',47- // plain "vX.Y.Z" tags only: excludes the "snapshot"/"snapshot-native"48- // pre-release tags (GitHub-flagged prereleases, filtered anyway by the49- // ignoreUnstable rule below) as well as the "-native" variant tags that50- // are a different release flavour and would break the download URL51- extractVersionTemplate: '^v(?<version>\\d+\\.\\d+\\.\\d+)$',52- },53- ],54- packageRules: [55- {56- "matchManagers": ["cargo"],57- "groupName": "Rust crate",58- "versioning": "cargo",59- "rangeStrategy": "bump"60- },61- {62- matchManagers: [63- 'github-actions',64- ],65- groupName: 'GitHub Actions',66- },67- {68- matchManagers: [69- 'dockerfile',70- ],71- matchUpdateTypes: [72- 'major',73- ],74- enabled: false,75- matchPackageNames: [76- '/node/',77- ],78- },79- {80- matchManagers: [81- 'dockerfile',82- ],83- groupName: 'Docker images',84- },85- {86- matchManagers: [87- 'pip_requirements',88- ],89- groupName: 'Python dependencies',90- },91- {92- matchManagers: [93- 'npm',94- ],95- groupName: 'Node dependencies',96- },97- // each diagram library lives in its own service directory; group updates98- // per directory so e.g. a bpmn-js bump doesn't wait on / get bundled with99- // an unrelated wavedrom bump (overrides the generic "Node dependencies"100- // bucket above for these specific files)101- {102- matchManagers: [103- 'npm',104- ],105- matchFileNames: [106- 'mermaid/package.json',107- ],108- groupName: 'Mermaid',109- },110- {111- matchManagers: [112- 'npm',113- ],114- matchFileNames: [115- 'bpmn/package.json',116- ],117- groupName: 'bpmn-js',118- },119- {120- matchManagers: [121- 'npm',122- ],123- matchFileNames: [124- 'nomnoml/package.json',125- ],126- groupName: 'nomnoml',127- },128- {129- matchManagers: [130- 'npm',131- ],132- matchFileNames: [133- 'bytefield/package.json',134- ],135- groupName: 'Bytefield',136- },137- {138- matchManagers: [139- 'npm',140- ],141- matchFileNames: [142- 'wavedrom/package.json',143- ],144- groupName: 'WaveDrom',145- },146- {147- matchManagers: [148- 'npm',149- ],150- matchFileNames: [151- 'excalidraw/package.json',152- ],153- groupName: 'Excalidraw',154- },155- {156- matchManagers: [157- 'npm',158- ],159- matchFileNames: [160- 'dbml/package.json',161- ],162- groupName: 'DBML',163- },164- // @biomejs/biome, esbuild, postject and the volta node pin are identical165- // build tooling duplicated across every diagram-library package.json166- // (mermaid/, bpmn/, wavedrom/, ...). Without this rule each directory's167- // groupName above would bundle these internal-only bumps together with168- // the actual diagram library version (e.g. PR #2122 mixed a wavedrom169- // bump with @biomejs/biome, esbuild and node), which is wrong per the170- // changelog rule: library bumps are user-visible, tooling bumps aren't.171- // Placed after the per-directory rules so it wins on groupName for172- // these package names and collapses them into one shared PR.173- {174- matchManagers: [175- 'npm',176- ],177- matchPackageNames: [178- '@biomejs/biome',179- 'esbuild',180- 'postject',181- 'node',182- ],183- groupName: 'Build tooling',184- },185- // vega and vega-lite are tracked via vega/deno.json (Renovate's "imports"186- // manager, not "npm"), so they're already excluded from the "Node187- // dependencies" bucket above and get one PR per package by default —188- // no rule needed here to keep them independent of each other.189- {190- matchManagers: [191- 'npm',192- ],193- enabled: false,194- matchPackageNames: [195- '/puppeteer/',196- ],197- },198- {199- // lockfile regeneration resolves versions published at least 14 days ago200- // (Renovate passes --before to npm, covering transitive dependencies too)201- matchManagers: [202- 'npm',203- ],204- matchUpdateTypes: [205- 'lockFileMaintenance',206- ],207- minimumReleaseAge: '14 days',208- },209- {210- matchManagers: [211- 'maven',212- ],213- groupName: 'Java dependencies',214- },215- {216- matchManagers: [217- 'maven',218- ],219- groupName: 'Java testing packages',220- matchPackageNames: [221- '/^org.mockito/',222- '/^org.junit.jupiter/',223- '/^org.assertj/',224- ],225- },226- {227- matchManagers: [228- 'maven',229- ],230- groupName: 'Maven plugins',231- matchPackageNames: [232- '/^org.apache.maven.plugins/',233- ],234- },235- {236- matchManagers: [237- 'maven',238- ],239- groupName: 'Structurizr packages',240- matchPackageNames: [241- '/^com.structurizr/',242- ],243- },244- {245- // updating PlantUML touches several non-automatable spots (Dockerfile,246- // docs/antora.yml, Plantuml.java, ...), so only surface it on the247- // dependency dashboard and wait for manual approval instead of raising a PR248- matchDepNames: [249- 'plantuml/plantuml',250- ],251- matchDatasources: [252- 'github-releases',253- ],254- groupName: 'PlantUML',255- dependencyDashboardApproval: true,256- // belt-and-suspenders: never suggest the "snapshot" pre-release, only257- // the latest stable tag, even though extractVersionTemplate already258- // filters it out259- ignoreUnstable: true,260- },261- ],262- lockFileMaintenance: {263- enabled: true,264- automerge: true,265- },266-}