Skip to content

Commit

Permalink
Merge branch 'yuzutech:main' into add-onlinewardleymaps
Browse files Browse the repository at this point in the history
  • Loading branch information
Heiss authored Jul 31, 2024
2 parents d97533e + ba7a512 commit 1efaee4
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dockerhub-description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
docker-hub-description:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected].4
- uses: actions/[email protected].7

- name: Docker Hub Description
uses: peter-evans/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion bpmn/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.12-alpine3.18
FROM node:20.13-alpine3.18

RUN addgroup -g 1001 kroki && adduser -D -G kroki -u 1001 kroki

Expand Down
2 changes: 1 addition & 1 deletion diagrams.net/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.12-alpine3.18
FROM node:20.13-alpine3.18

RUN addgroup -g 1001 kroki && adduser -D -G kroki -u 1001 kroki

Expand Down
2 changes: 1 addition & 1 deletion diagrams.net/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { SyntaxError, TimeoutError, Worker } from './worker.js'
const url = new URL(req.url, 'http://localhost') // create a URL object. The base is not important here
const outputType = url.pathname.match(/\/(png|svg)$/)?.[1]
if (outputType) {
const diagramSource = await micro.text(req, { limit: '1mb', encoding: 'utf8' })
const diagramSource = await micro.text(req, { limit: (process.env.KROKI_MAX_BODY_SIZE ?? '1mb'), encoding: 'utf8' })
if (diagramSource) {
try {
const isPng = outputType === 'png'
Expand Down
6 changes: 6 additions & 0 deletions docs/modules/setup/pages/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,12 @@ We recommend to use a maximum length that's not greater than 8192 and not greate

KROKI_MAX_HEADER_SIZE:: The maximum length of all headers. If the sum of the length of each header exceeds this value, 431 (Request Header Fields Too Large) response status code is sent. Defaults to 8192.

== Max body size

KROKI_MAX_BODY_SIZE:: The maximum size of the http body. If the size of the body exceeds this value, 413 (Content Too Large) response status code is sent. Defaults to `1mb`.

NOTE: These variables are only available on the diagrams.net, excalidraw and mermaid containers.

== Excalidraw static assets

By default, Excalidraw loads assets from a public CDN (https://unpkg.com).
Expand Down
2 changes: 1 addition & 1 deletion excalidraw/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.12-alpine3.18
FROM node:20.13-alpine3.18

RUN addgroup -g 1001 kroki && adduser -D -G kroki -u 1001 kroki

Expand Down
2 changes: 1 addition & 1 deletion excalidraw/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { create } from './browser-instance.js'
micro.serve(async (req, res) => {
// TODO: add a /_status route (return excalidraw version)
// TODO: read the diagram source as plain text
const diagramSource = await micro.text(req, { limit: '1mb', encoding: 'utf8' })
const diagramSource = await micro.text(req, { limit: (process.env.KROKI_MAX_BODY_SIZE ?? '1mb'), encoding: 'utf8' })
if (diagramSource) {
try {
const svg = await worker.convert(new Task(diagramSource))
Expand Down
2 changes: 1 addition & 1 deletion mermaid/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.12-alpine3.18
FROM node:20.13-alpine3.18

RUN addgroup -g 1001 kroki && adduser -D -G kroki -u 1001 kroki

Expand Down
2 changes: 1 addition & 1 deletion mermaid/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { create } from './browser-instance.js'
const url = new URL(req.url, 'http://localhost') // create a URL object. The base is not important here
const outputType = url.pathname.match(/\/(png|svg)$/)?.[1]
if (outputType) {
const diagramSource = await micro.text(req, { limit: '1mb', encoding: 'utf8' })
const diagramSource = await micro.text(req, { limit: (process.env.KROKI_MAX_BODY_SIZE ?? '1mb'), encoding: 'utf8' })
if (diagramSource) {
try {
const isPng = outputType === 'png'
Expand Down
2 changes: 1 addition & 1 deletion server/ops/docker/jdk17-jammy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ RUN wget -q "https://pikchr.org/home/raw/${PIKCHR_VERSION}" -O pikchr.c
RUN gcc -O0 -g -static -Wall -Wextra -DPIKCHR_SHELL pikchr.c -o pikchr -lm

## SVGBob
FROM --platform=$BUILDPLATFORM rust:1.78-slim-bullseye AS kroki-builder-static-svgbob
FROM --platform=$BUILDPLATFORM rust:1.80-slim-bullseye AS kroki-builder-static-svgbob

# Install cross-compilation tools
RUN apt-get update && apt-get install --no-install-recommends --yes \
Expand Down
8 changes: 4 additions & 4 deletions server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
<netty.version>4.1.107.Final</netty.version>
<logback.version>1.5.3</logback.version>
<vertx.version>4.5.4</vertx.version>
<junit.jupiter.version>5.10.2</junit.jupiter.version>
<assertj-core.version>3.25.3</assertj-core.version>
<mockito-core.version>5.11.0</mockito-core.version>
<junit.jupiter.version>5.10.3</junit.jupiter.version>
<assertj-core.version>3.26.3</assertj-core.version>
<mockito-core.version>5.12.0</mockito-core.version>
<slf4j-api.version>2.0.12</slf4j-api.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<owasp-html-sanitizer.version>20220608.1</owasp-html-sanitizer.version>
<owasp-html-sanitizer.version>20240325.1</owasp-html-sanitizer.version>
<structurizr-dsl.version>2.1.2</structurizr-dsl.version>
<structurizr-export.version>2.1.2</structurizr-export.version>
<structurizr-core.version>2.1.2</structurizr-core.version>
Expand Down

0 comments on commit 1efaee4

Please sign in to comment.