From 6e81f994d02b94899d15f7d48e2a152335379af1 Mon Sep 17 00:00:00 2001 From: Will Russell Date: Wed, 2 Apr 2025 16:35:51 +0100 Subject: [PATCH 01/11] fix: template files in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c706ab..c2c7e4d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This is the official repository for the Dokploy Open Source Templates. 1. Fork the repository 2. Create a new branch -3. Add the template to the `blueprints` folder (docker-compose.yml, template.yml) +3. Add the template to the `blueprints` folder (`docker-compose.yml`, `template.toml`) 4. Add the template metadata (name, description, version, logo, links, tags) to the `meta.json` file 5. Add the logo to the template folder 6. Commit and push your changes From 9290888ebea533646ac9ca7e1863d0039e13c766 Mon Sep 17 00:00:00 2001 From: Will Russell Date: Wed, 2 Apr 2025 16:44:31 +0100 Subject: [PATCH 02/11] feat: add kestra --- blueprints/kestra/docker-compose.yml | 65 ++++++++++++++++++++++++++++ blueprints/kestra/kestra.svg | 17 ++++++++ blueprints/kestra/template.toml | 13 ++++++ meta.json | 15 +++++++ 4 files changed, 110 insertions(+) create mode 100644 blueprints/kestra/docker-compose.yml create mode 100644 blueprints/kestra/kestra.svg create mode 100644 blueprints/kestra/template.toml diff --git a/blueprints/kestra/docker-compose.yml b/blueprints/kestra/docker-compose.yml new file mode 100644 index 0000000..505304b --- /dev/null +++ b/blueprints/kestra/docker-compose.yml @@ -0,0 +1,65 @@ +volumes: + postgres-data: + driver: local + kestra-data: + driver: local + +services: + postgres: + image: postgres + volumes: + - postgres-data:/var/lib/postgresql/data + environment: + POSTGRES_DB: kestra + POSTGRES_USER: kestra + POSTGRES_PASSWORD: k3str4 + healthcheck: + test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] + interval: 30s + timeout: 10s + retries: 10 + + kestra: + image: kestra/kestra:latest + pull_policy: always + # Note that this setup with a root user is intended for development purpose. + # Our base image runs without root, but the Docker Compose implementation needs root to access the Docker socket + # To run Kestra in a rootless mode in production, see: https://kestra.io/docs/installation/podman-compose + user: "root" + command: server standalone + volumes: + - kestra-data:/app/storage + - /var/run/docker.sock:/var/run/docker.sock + - /tmp/kestra-wd:/tmp/kestra-wd + environment: + KESTRA_CONFIGURATION: | + datasources: + postgres: + url: jdbc:postgresql://postgres:5432/kestra + driverClassName: org.postgresql.Driver + username: kestra + password: k3str4 + kestra: + server: + basicAuth: + enabled: false + username: "admin@localhost.dev" # it must be a valid email address + password: kestra + repository: + type: postgres + storage: + type: local + local: + basePath: "/app/storage" + queue: + type: postgres + tasks: + tmpDir: + path: /tmp/kestra-wd/tmp + url: http://localhost:8080/ + ports: + - "8080:8080" + - "8081:8081" + depends_on: + postgres: + condition: service_started \ No newline at end of file diff --git a/blueprints/kestra/kestra.svg b/blueprints/kestra/kestra.svg new file mode 100644 index 0000000..4d12c86 --- /dev/null +++ b/blueprints/kestra/kestra.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/blueprints/kestra/template.toml b/blueprints/kestra/template.toml new file mode 100644 index 0000000..c1cb733 --- /dev/null +++ b/blueprints/kestra/template.toml @@ -0,0 +1,13 @@ +[variables] +main_domain = "${domain}" + +[config] +[[config.domains]] +serviceName = "kestra" +port = 8080 +host = "${main_domain}" + + +[[config.env]] + +[[config.mounts]] \ No newline at end of file diff --git a/meta.json b/meta.json index 080fa61..e360670 100644 --- a/meta.json +++ b/meta.json @@ -2570,5 +2570,20 @@ "api", "self-hosted" ] + }, + { + "id": "kestra", + "name": "Kestra", + "version": "0.22", + "description": "Unified Orchestration Platform to Simplify Business-Critical Workflows and Govern them as Code and from the UI.", + "logo": "kestra.svg", + "links": { + "github": "https://github.com/kestra-io/kestra", + "website": "https://kestra.io", + "docs": "https://kestra.io/docs" + }, + "tags": [ + "automation" + ] } ] From 6e6ea19a1a3ee6224e377a1daac5ba9f78ce8d48 Mon Sep 17 00:00:00 2001 From: Will Russell Date: Wed, 2 Apr 2025 16:53:21 +0100 Subject: [PATCH 03/11] fix: version to latest --- meta.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/meta.json b/meta.json index e360670..c1cadc4 100644 --- a/meta.json +++ b/meta.json @@ -224,6 +224,21 @@ "automation" ] }, + { + "id": "kestra", + "name": "Kestra", + "version": "latest", + "description": "Unified Orchestration Platform to Simplify Business-Critical Workflows and Govern them as Code and from the UI.", + "logo": "kestra.svg", + "links": { + "github": "https://github.com/kestra-io/kestra", + "website": "https://kestra.io", + "docs": "https://kestra.io/docs" + }, + "tags": [ + "automation" + ] + }, { "id": "wordpress", "name": "Wordpress", @@ -2570,20 +2585,5 @@ "api", "self-hosted" ] - }, - { - "id": "kestra", - "name": "Kestra", - "version": "0.22", - "description": "Unified Orchestration Platform to Simplify Business-Critical Workflows and Govern them as Code and from the UI.", - "logo": "kestra.svg", - "links": { - "github": "https://github.com/kestra-io/kestra", - "website": "https://kestra.io", - "docs": "https://kestra.io/docs" - }, - "tags": [ - "automation" - ] } ] From ba22a7279145c6a027d33e899b72742bb3012dfc Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Wed, 2 Apr 2025 22:52:44 -0600 Subject: [PATCH 04/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c2c7e4d..d9c80f4 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ port = 3000 host = "${main_domain}" -[[config.env]] +[config.env] [[config.mounts]] ``` From a21c480fd5eee3c8cf1e2372ea9be375cc69b1d2 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Wed, 2 Apr 2025 22:53:02 -0600 Subject: [PATCH 05/11] Update template.toml --- blueprints/kestra/template.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blueprints/kestra/template.toml b/blueprints/kestra/template.toml index c1cb733..c941e42 100644 --- a/blueprints/kestra/template.toml +++ b/blueprints/kestra/template.toml @@ -8,6 +8,6 @@ port = 8080 host = "${main_domain}" -[[config.env]] +[config.env] -[[config.mounts]] \ No newline at end of file +[[config.mounts]] From fc4d766fd9b09e973b6831a72862baf2754475c6 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Thu, 3 Apr 2025 00:26:57 -0600 Subject: [PATCH 06/11] chore: enhance README with new helper variables and add meta.json validation in CI workflow --- .github/workflows/validate.yml | 44 ++++++++++++++++++++++++++++++++++ README.md | 4 +++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index cb8f737..cbb55bd 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -49,6 +49,50 @@ jobs: echo "✅ Blueprint folders validated successfully." fi + - name: Validate meta.json structure and required fields + run: | + echo "🔍 Validating meta.json structure and required fields..." + + ERROR=0 + + # Validate JSON structure and required fields + ENTRIES=$(jq -c '.[]' meta.json) + INDEX=0 + while IFS= read -r entry; do + ((INDEX++)) + + # Validate required top-level fields + for field in "id" "name" "version" "description" "logo" "links" "tags"; do + if [ "$(echo "$entry" | jq "has(\"$field\")")" != "true" ]; then + echo "❌ Entry #$INDEX is missing required field: $field" + ERROR=1 + fi + done + + # Validate links object required fields + if [ "$(echo "$entry" | jq 'has("links")')" == "true" ]; then + for link_field in "github" "website" "docs"; do + if [ "$(echo "$entry" | jq ".links | has(\"$link_field\")")" != "true" ]; then + echo "❌ Entry #$INDEX: links object is missing required field: $link_field" + ERROR=1 + fi + done + fi + + # Validate tags array is not empty + if [ "$(echo "$entry" | jq '.tags | length')" -eq 0 ]; then + echo "❌ Entry #$INDEX: tags array cannot be empty" + ERROR=1 + fi + done <<< "$ENTRIES" + + if [ $ERROR -eq 1 ]; then + echo "❌ meta.json structure validation failed." + exit 1 + else + echo "✅ meta.json structure validated successfully." + fi + - name: Validate meta.json matches blueprint folders and logo files run: | echo "🔍 Validating meta.json against blueprint folders and logos..." diff --git a/README.md b/README.md index d9c80f4..fcb2886 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ My content """ ``` -Important: you can reference any variable in the `domains`, `env` and `mounts` sections. just use the `${variable_name}` syntax, in the case you don't want to define a variable, you can use the `domain`, `base64`, `password`, `hash`, `uuid`, `randomPort` or `timestamp` helpers. +Important: you can reference any variable in the `domains`, `env` and `mounts` sections. just use the `${variable_name}` syntax, in the case you don't want to define a variable, you can use the `domain`, `base64`, `password`, `hash`, `uuid`, `randomPort`, `timestamp`, `jwt`, `email`, or `username` helpers. ### Helpers @@ -145,6 +145,8 @@ We have a few helpers that are very common when creating a template, these are: - `randomPort`: This is a helper that will generate a random port for the template. - `timestamp`: This is a helper that will generate a timestamp. - `jwt or jwt:length`: This is a helper that will generate a jwt for the template. +- `email`: This is a helper that will generate a random email for the template. +- `username`: This is a helper that will generate a random username in lowercase for the template. From 38e0936ae57072093c2a1f301f2828e16663706a Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Thu, 3 Apr 2025 00:36:15 -0600 Subject: [PATCH 07/11] chore: add validation checks for meta.json in CI workflow --- .github/workflows/validate.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index cbb55bd..1a56227 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -53,13 +53,32 @@ jobs: run: | echo "🔍 Validating meta.json structure and required fields..." + # First check if meta.json exists and is valid JSON + if [ ! -f "meta.json" ]; then + echo "❌ meta.json file not found" + exit 1 + fi + + if ! jq empty meta.json 2>/dev/null; then + echo "❌ meta.json is not a valid JSON file" + exit 1 + fi + ERROR=0 + # Debug: Show total number of entries + TOTAL_ENTRIES=$(jq '. | length' meta.json) + echo "📊 Total entries in meta.json: $TOTAL_ENTRIES" + # Validate JSON structure and required fields ENTRIES=$(jq -c '.[]' meta.json) INDEX=0 while IFS= read -r entry; do ((INDEX++)) + echo "🔍 Checking entry #$INDEX..." + + # Debug: Show the current entry + echo "Current entry: $entry" | jq '.' # Validate required top-level fields for field in "id" "name" "version" "description" "logo" "links" "tags"; do From 076c82490c70e6d387235e7d3bd8bb0f2dfe7786 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Thu, 3 Apr 2025 00:38:14 -0600 Subject: [PATCH 08/11] chore: improve meta.json validation with detailed error reporting and debug output --- .github/workflows/validate.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 1a56227..12a3545 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -51,6 +51,9 @@ jobs: - name: Validate meta.json structure and required fields run: | + set -x # Enable debug mode to see all commands + exec 2>&1 # Redirect stderr to stdout to see all output + echo "🔍 Validating meta.json structure and required fields..." # First check if meta.json exists and is valid JSON @@ -65,25 +68,28 @@ jobs: fi ERROR=0 + ERRORS_FOUND="" # Debug: Show total number of entries TOTAL_ENTRIES=$(jq '. | length' meta.json) echo "📊 Total entries in meta.json: $TOTAL_ENTRIES" # Validate JSON structure and required fields - ENTRIES=$(jq -c '.[]' meta.json) - INDEX=0 while IFS= read -r entry; do ((INDEX++)) + echo "-------------------------------------------" echo "🔍 Checking entry #$INDEX..." - # Debug: Show the current entry - echo "Current entry: $entry" | jq '.' + # Get the ID for better error reporting + ID=$(echo "$entry" | jq -r '.id // "UNKNOWN"') + echo "📝 Processing entry with ID: $ID" # Validate required top-level fields for field in "id" "name" "version" "description" "logo" "links" "tags"; do if [ "$(echo "$entry" | jq "has(\"$field\")")" != "true" ]; then - echo "❌ Entry #$INDEX is missing required field: $field" + ERROR_MSG="❌ Entry #$INDEX (ID: $ID) is missing required field: $field" + echo "$ERROR_MSG" + ERRORS_FOUND="$ERRORS_FOUND\n$ERROR_MSG" ERROR=1 fi done @@ -92,7 +98,9 @@ jobs: if [ "$(echo "$entry" | jq 'has("links")')" == "true" ]; then for link_field in "github" "website" "docs"; do if [ "$(echo "$entry" | jq ".links | has(\"$link_field\")")" != "true" ]; then - echo "❌ Entry #$INDEX: links object is missing required field: $link_field" + ERROR_MSG="❌ Entry #$INDEX (ID: $ID): links object is missing required field: $link_field" + echo "$ERROR_MSG" + ERRORS_FOUND="$ERRORS_FOUND\n$ERROR_MSG" ERROR=1 fi done @@ -100,13 +108,17 @@ jobs: # Validate tags array is not empty if [ "$(echo "$entry" | jq '.tags | length')" -eq 0 ]; then - echo "❌ Entry #$INDEX: tags array cannot be empty" + ERROR_MSG="❌ Entry #$INDEX (ID: $ID): tags array cannot be empty" + echo "$ERROR_MSG" + ERRORS_FOUND="$ERRORS_FOUND\n$ERROR_MSG" ERROR=1 fi - done <<< "$ENTRIES" + done < <(jq -c '.[]' meta.json) + echo "-------------------------------------------" if [ $ERROR -eq 1 ]; then echo "❌ meta.json structure validation failed." + echo -e "Summary of all errors found:$ERRORS_FOUND" exit 1 else echo "✅ meta.json structure validated successfully." From 8069689a7388cd67f32179c9e20bad6e268c8b48 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Thu, 3 Apr 2025 00:40:08 -0600 Subject: [PATCH 09/11] chore: streamline meta.json validation process by removing debug output and optimizing entry checks --- .github/workflows/validate.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 12a3545..48cfaa8 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -51,9 +51,6 @@ jobs: - name: Validate meta.json structure and required fields run: | - set -x # Enable debug mode to see all commands - exec 2>&1 # Redirect stderr to stdout to see all output - echo "🔍 Validating meta.json structure and required fields..." # First check if meta.json exists and is valid JSON @@ -74,9 +71,13 @@ jobs: TOTAL_ENTRIES=$(jq '. | length' meta.json) echo "📊 Total entries in meta.json: $TOTAL_ENTRIES" - # Validate JSON structure and required fields - while IFS= read -r entry; do - ((INDEX++)) + # Get all entries at once and process them + TOTAL_INDEX=$(($TOTAL_ENTRIES - 1)) + + for i in $(seq 0 $TOTAL_INDEX); do + entry=$(jq -c ".[$i]" meta.json) + INDEX=$((i + 1)) + echo "-------------------------------------------" echo "🔍 Checking entry #$INDEX..." @@ -89,7 +90,7 @@ jobs: if [ "$(echo "$entry" | jq "has(\"$field\")")" != "true" ]; then ERROR_MSG="❌ Entry #$INDEX (ID: $ID) is missing required field: $field" echo "$ERROR_MSG" - ERRORS_FOUND="$ERRORS_FOUND\n$ERROR_MSG" + ERRORS_FOUND="${ERRORS_FOUND}${ERROR_MSG}\n" ERROR=1 fi done @@ -100,7 +101,7 @@ jobs: if [ "$(echo "$entry" | jq ".links | has(\"$link_field\")")" != "true" ]; then ERROR_MSG="❌ Entry #$INDEX (ID: $ID): links object is missing required field: $link_field" echo "$ERROR_MSG" - ERRORS_FOUND="$ERRORS_FOUND\n$ERROR_MSG" + ERRORS_FOUND="${ERRORS_FOUND}${ERROR_MSG}\n" ERROR=1 fi done @@ -110,15 +111,15 @@ jobs: if [ "$(echo "$entry" | jq '.tags | length')" -eq 0 ]; then ERROR_MSG="❌ Entry #$INDEX (ID: $ID): tags array cannot be empty" echo "$ERROR_MSG" - ERRORS_FOUND="$ERRORS_FOUND\n$ERROR_MSG" + ERRORS_FOUND="${ERRORS_FOUND}${ERROR_MSG}\n" ERROR=1 fi - done < <(jq -c '.[]' meta.json) + done echo "-------------------------------------------" if [ $ERROR -eq 1 ]; then echo "❌ meta.json structure validation failed." - echo -e "Summary of all errors found:$ERRORS_FOUND" + echo -e "Summary of all errors found:${ERRORS_FOUND}" exit 1 else echo "✅ meta.json structure validated successfully." From 5a91d6ff8b8f0867cf262e88f82096fc521ef69b Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Thu, 3 Apr 2025 00:42:09 -0600 Subject: [PATCH 10/11] chore: add website links to various entries in meta.json for improved resource accessibility --- meta.json | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/meta.json b/meta.json index 080fa61..7bd2723 100644 --- a/meta.json +++ b/meta.json @@ -1,5 +1,4 @@ -[ - { +[ { "id": "appwrite", "name": "Appwrite", "version": "1.6.0", @@ -1543,7 +1542,8 @@ "logo": "it-tools.svg", "links": { "github": "https://github.com/CorentinTh/it-tools", - "website": "https://it-tools.tech" + "website": "https://it-tools.tech", + "docs": "https://it-tools.tech/docs" }, "tags": [ "developer", @@ -1577,7 +1577,8 @@ "logo": "glance.png", "links": { "github": "https://github.com/glanceapp/glance", - "docs": "https://github.com/glanceapp/glance/blob/main/docs/configuration.md" + "docs": "https://github.com/glanceapp/glance/blob/main/docs/configuration.md", + "website": "https://glance.app/" }, "tags": [ "dashboard", @@ -2055,7 +2056,8 @@ "logo": "logo.png", "links": { "github": "https://github.com/supernova3339/anonupload", - "docs": "https://github.com/Supernova3339/anonupload/blob/main/env.md" + "docs": "https://github.com/Supernova3339/anonupload/blob/main/env.md", + "website": "https://anonupload.com/" }, "tags": [ "file-sharing", @@ -2172,7 +2174,9 @@ "description": "Barrage is a minimalistic Deluge WebUI app with full mobile support. It features a responsive mobile-first design, allowing you to manage your torrents with ease from any device.", "logo": "logo.png", "links": { - "github": "https://github.com/maulik9898/barrage" + "github": "https://github.com/maulik9898/barrage", + "website": "https://github.com/maulik9898/barrage", + "docs": "https://github.com/maulik9898/barrage/blob/main/README.md" }, "tags": [ "torrents", @@ -2443,7 +2447,8 @@ "logo": "logo.png", "links": { "github": "https://github.com/linuxserver/docker-chromium", - "docs": "https://docs.linuxserver.io/images/docker-chromium" + "docs": "https://docs.linuxserver.io/images/docker-chromium", + "website": "https://docs.linuxserver.io/images/docker-chromium" }, "tags": [ "browser", From 0323d3db434d8f55638d00e6c7f6245e6fd2fd4b Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Thu, 3 Apr 2025 00:45:03 -0600 Subject: [PATCH 11/11] Update blueprints/kestra/docker-compose.yml --- blueprints/kestra/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blueprints/kestra/docker-compose.yml b/blueprints/kestra/docker-compose.yml index 505304b..8ec7fba 100644 --- a/blueprints/kestra/docker-compose.yml +++ b/blueprints/kestra/docker-compose.yml @@ -58,8 +58,8 @@ services: path: /tmp/kestra-wd/tmp url: http://localhost:8080/ ports: - - "8080:8080" - - "8081:8081" + - "8080" + - "8081" depends_on: postgres: condition: service_started \ No newline at end of file