From 36593a3efba080062bc9e53c36ad6016ad09327d Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Wed, 1 Oct 2025 23:23:58 -0400 Subject: [PATCH 01/16] PlantUML SWAG proxy. --- docker-compose.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index c123cd62..42553354 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4950,9 +4950,19 @@ services: - plant-it-valkey-data:/data/valkey plantuml-server: container_name: plantuml-server - expose: - - 8080 - image: "plantuml/plantuml-server:jetty@sha256:cd55fe13c6645253fbeb52665fc88a8d7e5c660e2bbff9b9ac045b0c136a1426" + image: plantuml/plantuml-server:jetty@sha256:cd55fe13c6645253fbeb52665fc88a8d7e5c660e2bbff9b9ac045b0c136a1426 + labels: + swag: enable + swag_port: 8080 + swag_url: plantuml.${MY_TLD} + swag.uptime-kuma.enabled: true + swag.uptime-kuma.monitor.parent: Rinoa + swag.uptime-kuma.monitor.url: https://plantuml.${MY_TLD} + swag.uptime-kuma.monitor.interval: 300 + swag.uptime-kuma.monitor.retryInterval: 60 + swag.uptime-kuma.monitor.maxretries: 5 + ports: + - 42262:8080 profiles: ["rinoa-apps"] restart: unless-stopped portainer: From 31c6f922bdeec88c9d12394fda601e653a307d17 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 06:16:28 -0400 Subject: [PATCH 02/16] PlantUML proxy, fixes for MongoDB and Invidious. --- docker-compose.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 42553354..064cc19f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2416,7 +2416,7 @@ services: swag_url: invid.${MY_TLD} swag_server_custom_directive: | location /companion { - proxy_pass http://invidious-companion:8282 + proxy_pass http://invidious-companion:8282; } swag.uptime-kuma.enabled: true swag.uptime-kuma.monitor.parent: Rinoa @@ -4097,9 +4097,7 @@ services: restart: unless-stopped volumes: - ${DOCKER_VOLUME_CONFIG}/mongodb/config:/etc/mongodb - - ${DOCKER_VOLUME_CONFIG}/mongodb/db:/data/mongodb/dbs - - ${DOCKER_VOLUME_CONFIG}/mongodb/logs:/data/mongodb/logs - - ${DOCKER_VOLUME_CONFIG}/mongodb/tmp:/data/mongodb/tmp + - ${DOCKER_VOLUME_CONFIG}/mongodb/db:/data/db multi-scrobbler: container_name: multi-scrobbler environment: From e83127d4f6cb2637ec429a425c8324a222cfe272 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 06:30:30 -0400 Subject: [PATCH 03/16] Dry-run tweak. --- .gitea/workflows/pr-cloudflare-docker-deploy.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitea/workflows/pr-cloudflare-docker-deploy.yml b/.gitea/workflows/pr-cloudflare-docker-deploy.yml index 20570e82..9dd25d39 100644 --- a/.gitea/workflows/pr-cloudflare-docker-deploy.yml +++ b/.gitea/workflows/pr-cloudflare-docker-deploy.yml @@ -189,6 +189,20 @@ jobs: with: version: ${{ env.HC_VAULT_VERSION }} + - name: Pre-pull service images + run: | + # Pull only the images needed for this dry run + for svc in ${DOCKER_SVC_LIST}; do + echo "Resolving image for service: $svc" + image=$(docker compose config | yq -r ".services[\"$svc\"].image") + if [ -n "$image" ] && [ "$image" != "null" ]; then + echo "Pulling $image" + docker pull "$image" + else + echo "⚠️ No image defined for $svc (might be build-only)" + fi + done + - name: Gotify Notification uses: eikendev/gotify-action@master with: From 60e20928238a77162896fc133d91262f59620f1b Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 06:48:06 -0400 Subject: [PATCH 04/16] PlantUML labels for Homepage. --- docker-compose.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 064cc19f..c0ce6b52 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4950,6 +4950,11 @@ services: container_name: plantuml-server image: plantuml/plantuml-server:jetty@sha256:cd55fe13c6645253fbeb52665fc88a8d7e5c660e2bbff9b9ac045b0c136a1426 labels: + homepage.group: Personal Tools + homepage.name: PlantUML + homepage.href: https://plantuml.${MY_TLD} + homepage.icon: plantuml.svg + homepage.description: Kanban board swag: enable swag_port: 8080 swag_url: plantuml.${MY_TLD} From b1295835ee6cecf2fa8e8c41e12199fe116a21e1 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 06:58:20 -0400 Subject: [PATCH 05/16] ... --- .../workflows/pr-cloudflare-docker-deploy.yml | 26 +++++++++---------- docker-compose.yml | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/pr-cloudflare-docker-deploy.yml b/.gitea/workflows/pr-cloudflare-docker-deploy.yml index 9dd25d39..ee3e3008 100644 --- a/.gitea/workflows/pr-cloudflare-docker-deploy.yml +++ b/.gitea/workflows/pr-cloudflare-docker-deploy.yml @@ -189,6 +189,19 @@ jobs: with: version: ${{ env.HC_VAULT_VERSION }} + - name: Gotify Notification + uses: eikendev/gotify-action@master + with: + gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}" + gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}" + notification_title: "GITEA: Docker Compose Dry Run @ Rinoa" + notification_message: "Starting Docker Compose dry run..." + + - name: Generate .env file for Docker Compose + run: | + vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env + echo ${DOCKER_SVC_LIST} + - name: Pre-pull service images run: | # Pull only the images needed for this dry run @@ -203,19 +216,6 @@ jobs: fi done - - name: Gotify Notification - uses: eikendev/gotify-action@master - with: - gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}" - gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}" - notification_title: "GITEA: Docker Compose Dry Run @ Rinoa" - notification_message: "Starting Docker Compose dry run..." - - - name: Generate .env file for Docker Compose - run: | - vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env - echo ${DOCKER_SVC_LIST} - - name: Docker Compose Dry Run uses: hoverkraft-tech/compose-action@b716db5b717cb9b81e391fe638e5aceaa2299e43 # v2.4.0 env: diff --git a/docker-compose.yml b/docker-compose.yml index c0ce6b52..3a19e4db 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4954,7 +4954,7 @@ services: homepage.name: PlantUML homepage.href: https://plantuml.${MY_TLD} homepage.icon: plantuml.svg - homepage.description: Kanban board + homepage.description: Diagram creation tool swag: enable swag_port: 8080 swag_url: plantuml.${MY_TLD} From c0763f2c24e55a1e75258629f1297469dc9d5f74 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 07:28:41 -0400 Subject: [PATCH 06/16] Docker image pre-pull. --- .gitea/actions/docker-img-pre-pull/action.yml | 37 ++++++++++++++++ .../workflows/pr-cloudflare-docker-deploy.yml | 43 ++++++++----------- 2 files changed, 56 insertions(+), 24 deletions(-) create mode 100644 .gitea/actions/docker-img-pre-pull/action.yml diff --git a/.gitea/actions/docker-img-pre-pull/action.yml b/.gitea/actions/docker-img-pre-pull/action.yml new file mode 100644 index 00000000..2bc2f6fc --- /dev/null +++ b/.gitea/actions/docker-img-pre-pull/action.yml @@ -0,0 +1,37 @@ +name: "Pre-pull or Build Docker images" +description: "Prepares all services for docker compose dry-run by pulling images or building them" +inputs: + services: + description: "Space-separated list of docker-compose services" + required: true + +runs: + using: "composite" + steps: + - name: Install yq (if missing) + shell: bash + run: | + if ! command -v yq >/dev/null 2>&1; then + sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_linux_amd64 + sudo chmod +x /usr/local/bin/yq + fi + + - name: Pre-pull/build images for services + shell: bash + run: | + echo "Services to resolve: ${{ inputs.services }}" + for svc in ${{ inputs.services }}; do + echo "Resolving image for service: $svc" + image=$(docker compose config | yq -r ".services[\"$svc\"].image // empty") + build_dir=$(docker compose config | yq -r ".services[\"$svc\"].build.context // empty") + + if [ -n "$image" ]; then + echo "Pulling image: $image" + docker pull "$image" + elif [ -n "$build_dir" ]; then + echo "Building image for service: $svc from context: $build_dir" + docker compose build "$svc" + else + echo "⚠️ No image or build context for $svc — skipping" + fi + done diff --git a/.gitea/workflows/pr-cloudflare-docker-deploy.yml b/.gitea/workflows/pr-cloudflare-docker-deploy.yml index ee3e3008..70ec2a07 100644 --- a/.gitea/workflows/pr-cloudflare-docker-deploy.yml +++ b/.gitea/workflows/pr-cloudflare-docker-deploy.yml @@ -160,10 +160,6 @@ jobs: - name: Checkout uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - # - name: Login to Gitea Container Registry - # run: | - # docker login -u gitea-sonarqube-bot -p ${RINOA_REGISTRY_PASSWORD} git.trez.wtf - - name: Login to Docker Hub uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 with: @@ -184,10 +180,18 @@ jobs: username: ${{ secrets.BOT_GITEA_USER }} password: ${{ secrets.BOT_GITEA_PASSWORD }} - - name: Install Vault (only if not cached) - uses: cpanato/vault-installer@main + # - name: Install Vault (only if not cached) + # uses: cpanato/vault-installer@main + # with: + # version: ${{ env.HC_VAULT_VERSION }} + + - name: Get env file + uses: Simporter/get-env-file-from-vault@v1.0.3 with: - version: ${{ env.HC_VAULT_VERSION }} + VAULT_ADDR: ${{ secrets.TREZ_VAULT_ADDR }} + VAULT_USERNAME: ${{ secrets.VAULT_GITEA_USER }} + VAULT_PASSWORD: ${{ secrets.VAULT_GITEA_PASSWORD }} + VAULT_SECRETS_PATH: rinoa-docker/env - name: Gotify Notification uses: eikendev/gotify-action@master @@ -197,24 +201,15 @@ jobs: notification_title: "GITEA: Docker Compose Dry Run @ Rinoa" notification_message: "Starting Docker Compose dry run..." - - name: Generate .env file for Docker Compose - run: | - vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env - echo ${DOCKER_SVC_LIST} + # - name: Generate .env file for Docker Compose + # run: | + # vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env + # echo ${DOCKER_SVC_LIST} - - name: Pre-pull service images - run: | - # Pull only the images needed for this dry run - for svc in ${DOCKER_SVC_LIST}; do - echo "Resolving image for service: $svc" - image=$(docker compose config | yq -r ".services[\"$svc\"].image") - if [ -n "$image" ] && [ "$image" != "null" ]; then - echo "Pulling $image" - docker pull "$image" - else - echo "⚠️ No image defined for $svc (might be build-only)" - fi - done + - name: Pre-pull/build service images + uses: ./.gitea/actions/prepull-images + with: + services: ${{ env.DOCKER_SVC_LIST }} - name: Docker Compose Dry Run uses: hoverkraft-tech/compose-action@b716db5b717cb9b81e391fe638e5aceaa2299e43 # v2.4.0 From 497a60b1515c4759eaa3500b4cc46275a4a5d3d5 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 07:28:41 -0400 Subject: [PATCH 07/16] Description for PlantUML. --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3a19e4db..344c7cad 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4954,7 +4954,7 @@ services: homepage.name: PlantUML homepage.href: https://plantuml.${MY_TLD} homepage.icon: plantuml.svg - homepage.description: Diagram creation tool + homepage.description: Textual diagram generator for UML and other visualizations. swag: enable swag_port: 8080 swag_url: plantuml.${MY_TLD} From a14a86fecf5d79a0589f91ab8a94ce812577a134 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 07:40:12 -0400 Subject: [PATCH 08/16] Docker image pre-pull. --- .gitea/actions/docker-img-pre-pull/action.yml | 47 ++++++++++++------- .../workflows/pr-cloudflare-docker-deploy.yml | 34 +++++++------- 2 files changed, 46 insertions(+), 35 deletions(-) diff --git a/.gitea/actions/docker-img-pre-pull/action.yml b/.gitea/actions/docker-img-pre-pull/action.yml index 2bc2f6fc..ed7ac175 100644 --- a/.gitea/actions/docker-img-pre-pull/action.yml +++ b/.gitea/actions/docker-img-pre-pull/action.yml @@ -1,10 +1,9 @@ -name: "Pre-pull or Build Docker images" -description: "Prepares all services for docker compose dry-run by pulling images or building them" +name: "Pre-pull/build Docker images in parallel with timing" +description: "Prepares all services for docker compose dry-run by pulling or building them concurrently with logs" inputs: services: description: "Space-separated list of docker-compose services" required: true - runs: using: "composite" steps: @@ -12,26 +11,38 @@ runs: shell: bash run: | if ! command -v yq >/dev/null 2>&1; then + echo "Installing yq..." sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_linux_amd64 sudo chmod +x /usr/local/bin/yq fi - - name: Pre-pull/build images for services + - name: Pre-pull/build images in parallel shell: bash run: | - echo "Services to resolve: ${{ inputs.services }}" - for svc in ${{ inputs.services }}; do - echo "Resolving image for service: $svc" - image=$(docker compose config | yq -r ".services[\"$svc\"].image // empty") - build_dir=$(docker compose config | yq -r ".services[\"$svc\"].build.context // empty") + SERVICES="${{ inputs.services }}" + echo "Services to process: $SERVICES" + for svc in $SERVICES; do + ( + echo "🔹 Starting prep for service: $svc" + start_time=$(date +%s) - if [ -n "$image" ]; then - echo "Pulling image: $image" - docker pull "$image" - elif [ -n "$build_dir" ]; then - echo "Building image for service: $svc from context: $build_dir" - docker compose build "$svc" - else - echo "⚠️ No image or build context for $svc — skipping" - fi + image=$(docker compose config | yq -r ".services[\"$svc\"].image // empty") + build_dir=$(docker compose config | yq -r ".services[\"$svc\"].build.context // empty") + + if [ -n "$image" ]; then + echo "➡️ Pulling image: $image" + docker pull "$image" + elif [ -n "$build_dir" ]; then + echo "⚙️ Building service: $svc from context: $build_dir" + docker compose build "$svc" + else + echo "⚠️ No image or build context found for $svc — skipping" + fi + + end_time=$(date +%s) + duration=$((end_time - start_time)) + echo "✅ Finished $svc in ${duration}s" + ) & done + wait + echo "🎯 All services processed." diff --git a/.gitea/workflows/pr-cloudflare-docker-deploy.yml b/.gitea/workflows/pr-cloudflare-docker-deploy.yml index 70ec2a07..0fd378a0 100644 --- a/.gitea/workflows/pr-cloudflare-docker-deploy.yml +++ b/.gitea/workflows/pr-cloudflare-docker-deploy.yml @@ -180,18 +180,18 @@ jobs: username: ${{ secrets.BOT_GITEA_USER }} password: ${{ secrets.BOT_GITEA_PASSWORD }} - # - name: Install Vault (only if not cached) - # uses: cpanato/vault-installer@main - # with: - # version: ${{ env.HC_VAULT_VERSION }} - - - name: Get env file - uses: Simporter/get-env-file-from-vault@v1.0.3 + - name: Install Vault (only if not cached) + uses: cpanato/vault-installer@main with: - VAULT_ADDR: ${{ secrets.TREZ_VAULT_ADDR }} - VAULT_USERNAME: ${{ secrets.VAULT_GITEA_USER }} - VAULT_PASSWORD: ${{ secrets.VAULT_GITEA_PASSWORD }} - VAULT_SECRETS_PATH: rinoa-docker/env + version: ${{ env.HC_VAULT_VERSION }} + + # - name: Get env file + # uses: Simporter/get-env-file-from-vault@v1.0.3 + # with: + # VAULT_ADDR: ${{ secrets.TREZ_VAULT_ADDR }} + # VAULT_USERNAME: ${{ secrets.VAULT_GITEA_USER }} + # VAULT_PASSWORD: ${{ secrets.VAULT_GITEA_PASSWORD }} + # VAULT_SECRETS_PATH: rinoa-docker/env - name: Gotify Notification uses: eikendev/gotify-action@master @@ -201,13 +201,13 @@ jobs: notification_title: "GITEA: Docker Compose Dry Run @ Rinoa" notification_message: "Starting Docker Compose dry run..." - # - name: Generate .env file for Docker Compose - # run: | - # vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env - # echo ${DOCKER_SVC_LIST} + - name: Generate .env file for Docker Compose + run: | + vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env + echo ${DOCKER_SVC_LIST} - - name: Pre-pull/build service images - uses: ./.gitea/actions/prepull-images + - name: Pre-pull/build service images in parallel + uses: ./.github/actions/docker-img-pre-pull with: services: ${{ env.DOCKER_SVC_LIST }} From 4fd6329049cf8f2d7a59028e8513b6f755a69084 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 07:40:19 -0400 Subject: [PATCH 09/16] Docker image pre-pull. --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 344c7cad..2b0043df 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4954,7 +4954,7 @@ services: homepage.name: PlantUML homepage.href: https://plantuml.${MY_TLD} homepage.icon: plantuml.svg - homepage.description: Textual diagram generator for UML and other visualizations. + homepage.description: Textual diagram generator for UML and other visualizations swag: enable swag_port: 8080 swag_url: plantuml.${MY_TLD} From 683a496c93277470b5f221f7dbc11c04be208e17 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 07:47:31 -0400 Subject: [PATCH 10/16] Docker image pre-pull. --- .gitea/workflows/pr-cloudflare-docker-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/pr-cloudflare-docker-deploy.yml b/.gitea/workflows/pr-cloudflare-docker-deploy.yml index 0fd378a0..fd77b300 100644 --- a/.gitea/workflows/pr-cloudflare-docker-deploy.yml +++ b/.gitea/workflows/pr-cloudflare-docker-deploy.yml @@ -207,7 +207,7 @@ jobs: echo ${DOCKER_SVC_LIST} - name: Pre-pull/build service images in parallel - uses: ./.github/actions/docker-img-pre-pull + uses: ./.gitea/actions/docker-img-pre-pull with: services: ${{ env.DOCKER_SVC_LIST }} From f2d4335203e397d1a54679fee3e19925e5eede50 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 07:47:31 -0400 Subject: [PATCH 11/16] Description for PlantUML. --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2b0043df..93bfeff1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4954,7 +4954,7 @@ services: homepage.name: PlantUML homepage.href: https://plantuml.${MY_TLD} homepage.icon: plantuml.svg - homepage.description: Textual diagram generator for UML and other visualizations + homepage.description: Textual diagram generator for UML & other visualizations swag: enable swag_port: 8080 swag_url: plantuml.${MY_TLD} From 8f61e5674403829ff8bba38ffc0ade9019080551 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 07:53:57 -0400 Subject: [PATCH 12/16] .... --- .gitea/actions/docker-img-pre-pull/action.yml | 68 +++++++++++-------- docker-compose.yml | 2 +- 2 files changed, 40 insertions(+), 30 deletions(-) diff --git a/.gitea/actions/docker-img-pre-pull/action.yml b/.gitea/actions/docker-img-pre-pull/action.yml index ed7ac175..216faa11 100644 --- a/.gitea/actions/docker-img-pre-pull/action.yml +++ b/.gitea/actions/docker-img-pre-pull/action.yml @@ -1,48 +1,58 @@ -name: "Pre-pull/build Docker images in parallel with timing" -description: "Prepares all services for docker compose dry-run by pulling or building them concurrently with logs" +name: "Pre-pull/build Docker images in parallel" +description: "Prepares services for docker compose dry-run by pulling or building them concurrently" +author: "Your Name " + inputs: services: description: "Space-separated list of docker-compose services" required: true + runs: using: "composite" steps: - - name: Install yq (if missing) + - name: Pre-pull/build services shell: bash run: | - if ! command -v yq >/dev/null 2>&1; then - echo "Installing yq..." - sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_linux_amd64 - sudo chmod +x /usr/local/bin/yq + set -euo pipefail + + SERVICES="${{ inputs.services }}" + if [ -z "$SERVICES" ]; then + echo "❌ No services provided. Exiting." + exit 1 fi - - name: Pre-pull/build images in parallel - shell: bash - run: | - SERVICES="${{ inputs.services }}" - echo "Services to process: $SERVICES" + echo "Services to process:" + echo "$SERVICES" + for svc in $SERVICES; do - ( - echo "🔹 Starting prep for service: $svc" - start_time=$(date +%s) + ( + echo "🔹 Starting prep for service: $svc" + start_time=$(date +%s) - image=$(docker compose config | yq -r ".services[\"$svc\"].image // empty") - build_dir=$(docker compose config | yq -r ".services[\"$svc\"].build.context // empty") + # Get image name; default to empty string if missing + image=$(docker compose config | yq -r ".services[\"$svc\"].image // \"\"") + # Get build context; default to empty string if missing + build_dir=$(docker compose config | yq -r ".services[\"$svc\"].build.context // \"\"") - if [ -n "$image" ]; then - echo "➡️ Pulling image: $image" - docker pull "$image" - elif [ -n "$build_dir" ]; then - echo "⚙️ Building service: $svc from context: $build_dir" - docker compose build "$svc" - else - echo "⚠️ No image or build context found for $svc — skipping" + if [ -n "$image" ]; then + echo "➡️ Pulling image for $svc: $image" + if ! docker pull "$image"; then + echo "⚠️ Failed to pull image $image for service $svc" fi + elif [ -n "$build_dir" ]; then + echo "⚙️ Building service: $svc from context: $build_dir" + if ! docker compose build "$svc"; then + echo "⚠️ Failed to build service $svc" + fi + else + echo "⚠️ No image or build context for $svc — skipping" + fi - end_time=$(date +%s) - duration=$((end_time - start_time)) - echo "✅ Finished $svc in ${duration}s" - ) & + end_time=$(date +%s) + duration=$((end_time - start_time)) + echo "✅ Finished $svc in ${duration}s" + ) & done + wait echo "🎯 All services processed." diff --git a/docker-compose.yml b/docker-compose.yml index 93bfeff1..6d928ba5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4954,7 +4954,7 @@ services: homepage.name: PlantUML homepage.href: https://plantuml.${MY_TLD} homepage.icon: plantuml.svg - homepage.description: Textual diagram generator for UML & other visualizations + homepage.description: Textual diagram generator for UML & other visualizations. swag: enable swag_port: 8080 swag_url: plantuml.${MY_TLD} From a96075ab3b4c370209e81b175c12d7bd0441cd42 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 08:04:29 -0400 Subject: [PATCH 13/16] Docker image pre-pull. --- .gitea/actions/docker-img-pre-pull/action.yml | 46 +++++++++++++------ .../workflows/pr-cloudflare-docker-deploy.yml | 32 +++++++------ 2 files changed, 49 insertions(+), 29 deletions(-) diff --git a/.gitea/actions/docker-img-pre-pull/action.yml b/.gitea/actions/docker-img-pre-pull/action.yml index 216faa11..0f730afe 100644 --- a/.gitea/actions/docker-img-pre-pull/action.yml +++ b/.gitea/actions/docker-img-pre-pull/action.yml @@ -1,21 +1,41 @@ -name: "Pre-pull/build Docker images in parallel" -description: "Prepares services for docker compose dry-run by pulling or building them concurrently" +name: "Pre-pull Docker Compose service images" +description: "Prepares Docker Compose services by pulling images in parallel before dry-run" author: "Your Name " inputs: services: - description: "Space-separated list of docker-compose services" + description: "Space-separated list of Docker Compose services" required: true + compose_profile: + description: "Docker Compose profile to use (optional)" + required: false + default: "" + env_file: + description: "Path to .env file (optional)" + required: false + default: ".env" runs: using: "composite" steps: + - name: Install yq + shell: bash + run: | + if ! command -v yq >/dev/null; then + echo "Installing yq..." + wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 + chmod +x /usr/local/bin/yq + fi + - name: Pre-pull/build services shell: bash run: | set -euo pipefail SERVICES="${{ inputs.services }}" + PROFILE="${{ inputs.compose_profile }}" + ENV_FILE="${{ inputs.env_file }}" + if [ -z "$SERVICES" ]; then echo "❌ No services provided. Exiting." exit 1 @@ -24,28 +44,26 @@ runs: echo "Services to process:" echo "$SERVICES" + CONFIG_CMD="docker compose" + if [ -n "$PROFILE" ]; then + CONFIG_CMD="$CONFIG_CMD --profile $PROFILE" + fi + CONFIG_CMD="$CONFIG_CMD --env-file $ENV_FILE config" + for svc in $SERVICES; do ( echo "🔹 Starting prep for service: $svc" start_time=$(date +%s) - # Get image name; default to empty string if missing - image=$(docker compose config | yq -r ".services[\"$svc\"].image // \"\"") - # Get build context; default to empty string if missing - build_dir=$(docker compose config | yq -r ".services[\"$svc\"].build.context // \"\"") + image=$(eval $CONFIG_CMD | yq -r ".services[\"$svc\"].image // \"\"") - if [ -n "$image" ]; then + if [ -n "$image" ] && [ "$image" != "null" ]; then echo "➡️ Pulling image for $svc: $image" if ! docker pull "$image"; then echo "⚠️ Failed to pull image $image for service $svc" fi - elif [ -n "$build_dir" ]; then - echo "⚙️ Building service: $svc from context: $build_dir" - if ! docker compose build "$svc"; then - echo "⚠️ Failed to build service $svc" - fi else - echo "⚠️ No image or build context for $svc — skipping" + echo "⚠️ No image defined for $svc — skipping" fi end_time=$(date +%s) diff --git a/.gitea/workflows/pr-cloudflare-docker-deploy.yml b/.gitea/workflows/pr-cloudflare-docker-deploy.yml index fd77b300..9a347d56 100644 --- a/.gitea/workflows/pr-cloudflare-docker-deploy.yml +++ b/.gitea/workflows/pr-cloudflare-docker-deploy.yml @@ -180,18 +180,18 @@ jobs: username: ${{ secrets.BOT_GITEA_USER }} password: ${{ secrets.BOT_GITEA_PASSWORD }} - - name: Install Vault (only if not cached) - uses: cpanato/vault-installer@main - with: - version: ${{ env.HC_VAULT_VERSION }} - - # - name: Get env file - # uses: Simporter/get-env-file-from-vault@v1.0.3 + # - name: Install Vault (only if not cached) + # uses: cpanato/vault-installer@main # with: - # VAULT_ADDR: ${{ secrets.TREZ_VAULT_ADDR }} - # VAULT_USERNAME: ${{ secrets.VAULT_GITEA_USER }} - # VAULT_PASSWORD: ${{ secrets.VAULT_GITEA_PASSWORD }} - # VAULT_SECRETS_PATH: rinoa-docker/env + # version: ${{ env.HC_VAULT_VERSION }} + + - name: Generate .env file from Hashicorp Vault + uses: Simporter/get-env-file-from-vault@v1.0.3 + with: + VAULT_ADDR: ${{ secrets.TREZ_VAULT_ADDR }} + VAULT_USERNAME: ${{ secrets.VAULT_GITEA_USER }} + VAULT_PASSWORD: "${{ secrets.VAULT_GITEA_PASSWORD }}" + VAULT_SECRETS_PATH: rinoa-docker/env - name: Gotify Notification uses: eikendev/gotify-action@master @@ -201,15 +201,17 @@ jobs: notification_title: "GITEA: Docker Compose Dry Run @ Rinoa" notification_message: "Starting Docker Compose dry run..." - - name: Generate .env file for Docker Compose - run: | - vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env - echo ${DOCKER_SVC_LIST} + # - name: Generate .env file for Docker Compose + # run: | + # vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env + # echo ${DOCKER_SVC_LIST} - name: Pre-pull/build service images in parallel uses: ./.gitea/actions/docker-img-pre-pull with: services: ${{ env.DOCKER_SVC_LIST }} + compose_profile: "rinoa-apps" + env_file: ".env" - name: Docker Compose Dry Run uses: hoverkraft-tech/compose-action@b716db5b717cb9b81e391fe638e5aceaa2299e43 # v2.4.0 From cb06a655473c8ea45a4fb480ed85d0da9a0b27c6 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 08:04:29 -0400 Subject: [PATCH 14/16] Description for PlantUML. --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6d928ba5..93bfeff1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4954,7 +4954,7 @@ services: homepage.name: PlantUML homepage.href: https://plantuml.${MY_TLD} homepage.icon: plantuml.svg - homepage.description: Textual diagram generator for UML & other visualizations. + homepage.description: Textual diagram generator for UML & other visualizations swag: enable swag_port: 8080 swag_url: plantuml.${MY_TLD} From 75afc450253317c4b8ee7fcd4a80d8891cf2d184 Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 08:16:50 -0400 Subject: [PATCH 15/16] .... --- .../workflows/pr-cloudflare-docker-deploy.yml | 30 +++++++++---------- docker-compose.yml | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.gitea/workflows/pr-cloudflare-docker-deploy.yml b/.gitea/workflows/pr-cloudflare-docker-deploy.yml index 9a347d56..7edcc9fd 100644 --- a/.gitea/workflows/pr-cloudflare-docker-deploy.yml +++ b/.gitea/workflows/pr-cloudflare-docker-deploy.yml @@ -180,18 +180,13 @@ jobs: username: ${{ secrets.BOT_GITEA_USER }} password: ${{ secrets.BOT_GITEA_PASSWORD }} - # - name: Install Vault (only if not cached) - # uses: cpanato/vault-installer@main + # - name: Generate .env file from Hashicorp Vault + # uses: Simporter/get-env-file-from-vault@v1.0.3 # with: - # version: ${{ env.HC_VAULT_VERSION }} - - - name: Generate .env file from Hashicorp Vault - uses: Simporter/get-env-file-from-vault@v1.0.3 - with: - VAULT_ADDR: ${{ secrets.TREZ_VAULT_ADDR }} - VAULT_USERNAME: ${{ secrets.VAULT_GITEA_USER }} - VAULT_PASSWORD: "${{ secrets.VAULT_GITEA_PASSWORD }}" - VAULT_SECRETS_PATH: rinoa-docker/env + # VAULT_ADDR: ${{ secrets.TREZ_VAULT_ADDR }} + # VAULT_USERNAME: ${{ secrets.VAULT_GITEA_USER }} + # VAULT_PASSWORD: "${{ secrets.VAULT_GITEA_PASSWORD }}" + # VAULT_SECRETS_PATH: rinoa-docker/env - name: Gotify Notification uses: eikendev/gotify-action@master @@ -201,10 +196,15 @@ jobs: notification_title: "GITEA: Docker Compose Dry Run @ Rinoa" notification_message: "Starting Docker Compose dry run..." - # - name: Generate .env file for Docker Compose - # run: | - # vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env - # echo ${DOCKER_SVC_LIST} + - name: Install Vault (only if not cached) + uses: cpanato/vault-installer@main + with: + version: ${{ env.HC_VAULT_VERSION }} + + - name: Generate .env file for Docker Compose + run: | + vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env + echo ${DOCKER_SVC_LIST} - name: Pre-pull/build service images in parallel uses: ./.gitea/actions/docker-img-pre-pull diff --git a/docker-compose.yml b/docker-compose.yml index 93bfeff1..6d928ba5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4954,7 +4954,7 @@ services: homepage.name: PlantUML homepage.href: https://plantuml.${MY_TLD} homepage.icon: plantuml.svg - homepage.description: Textual diagram generator for UML & other visualizations + homepage.description: Textual diagram generator for UML & other visualizations. swag: enable swag_port: 8080 swag_url: plantuml.${MY_TLD} From fc5236a2a512a2ee353474b2e2a0ce7fc9671eca Mon Sep 17 00:00:00 2001 From: "Trez.One" Date: Thu, 2 Oct 2025 12:24:13 +0000 Subject: [PATCH 16/16] chore: Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2814e66a..f6ef63b6 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ | planka-pg-db | postgres:16-alpine@sha256:66266770619a23ab310c7fa60043b6d1fa041038cb232ced59d2c509fecd297b | | | plant-it | msdeluise/plant-it-server:latest@sha256:23ddf8660087d6b9f5dbdca2ca09817b84db45cb2d9d6e2e0176e70f514629e7 | 🪴 Self-hosted, open source gardening companion app | | plant-it-valkey | docker.io/valkey/valkey:8-alpine | | -| plantuml-server | plantuml/plantuml-server:jetty@sha256:cd55fe13c6645253fbeb52665fc88a8d7e5c660e2bbff9b9ac045b0c136a1426 | | +| plantuml-server | plantuml/plantuml-server:jetty@sha256:cd55fe13c6645253fbeb52665fc88a8d7e5c660e2bbff9b9ac045b0c136a1426 | Textual diagram generator for UML & other visualizations. | | portainer | portainer/portainer-ce:alpine@sha256:c6908c1a2d036668799d51fb4d5ba5a5b3905509c7ac1b832c0fc0ef4c152f0e | Service delivery platform for containerized applications | | portchecker-web | ghcr.io/dsgnr/portcheckerio-web:latest@sha256:8bea203e8785541c0acac7860de9f70849b05806e0c6db1d83dfc1b8407a6077 | Service delivery platform for containerized applications | | portchecker-api | ghcr.io/dsgnr/portcheckerio-api:latest@sha256:7783796d791c3e10aedba9d5f7fc2b934bb0e7afa75bc89054b70b886ed39e5c | |