fix deploy: revert to localhost:3000 for buildx registry
Some checks failed
ci/woodpecker/push/infra-ci Pipeline was successful
coverage 99% coverage
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/deploy Pipeline failed

Docker daemon runs on host where localhost:3000 reaches Gitea.
The buildx plugin's docker login and push go through the daemon,
so localhost:3000 is correct. gitea:3000 fails because the daemon
can't resolve container DNS names.
This commit is contained in:
kert
2026-03-22 11:27:11 -04:00
parent b048854afa
commit 7b63207f5c
2 changed files with 30 additions and 32 deletions

View File

@@ -41,8 +41,8 @@ steps:
- name: build-push-notebooks - name: build-push-notebooks
image: woodpeckerci/plugin-docker-buildx image: woodpeckerci/plugin-docker-buildx
settings: settings:
repo: gitea:3000/homelab/notebooks repo: localhost:3000/homelab/notebooks
registry: gitea:3000 registry: localhost:3000
dockerfile: notebooks/Dockerfile dockerfile: notebooks/Dockerfile
context: notebooks/ context: notebooks/
tags: tags:
@@ -60,7 +60,7 @@ steps:
- name: scan-notebooks - name: scan-notebooks
image: woodpeckerci/plugin-trivy image: woodpeckerci/plugin-trivy
settings: settings:
image_ref: "gitea:3000/homelab/notebooks:sha-${CI_COMMIT_SHA:0:8}" image_ref: "localhost:3000/homelab/notebooks:sha-${CI_COMMIT_SHA:0:8}"
severity: HIGH,CRITICAL severity: HIGH,CRITICAL
exit_code: 0 exit_code: 0
output: notebooks-scan.json output: notebooks-scan.json
@@ -74,8 +74,8 @@ steps:
- name: build-push-zotero - name: build-push-zotero
image: woodpeckerci/plugin-docker-buildx image: woodpeckerci/plugin-docker-buildx
settings: settings:
repo: gitea:3000/homelab/zotero repo: localhost:3000/homelab/zotero
registry: gitea:3000 registry: localhost:3000
dockerfile: zotero/Dockerfile dockerfile: zotero/Dockerfile
context: zotero/ context: zotero/
tags: tags:
@@ -93,7 +93,7 @@ steps:
- name: scan-zotero - name: scan-zotero
image: woodpeckerci/plugin-trivy image: woodpeckerci/plugin-trivy
settings: settings:
image_ref: "gitea:3000/homelab/zotero:sha-${CI_COMMIT_SHA:0:8}" image_ref: "localhost:3000/homelab/zotero:sha-${CI_COMMIT_SHA:0:8}"
severity: HIGH,CRITICAL severity: HIGH,CRITICAL
exit_code: 0 exit_code: 0
output: zotero-scan.json output: zotero-scan.json
@@ -116,8 +116,8 @@ steps:
- name: build-push-docs - name: build-push-docs
image: woodpeckerci/plugin-docker-buildx image: woodpeckerci/plugin-docker-buildx
settings: settings:
repo: gitea:3000/homelab/docs repo: localhost:3000/homelab/docs
registry: gitea:3000 registry: localhost:3000
dockerfile: docs/Dockerfile dockerfile: docs/Dockerfile
context: . context: .
tags: tags:
@@ -137,7 +137,7 @@ steps:
- name: scan-docs - name: scan-docs
image: woodpeckerci/plugin-trivy image: woodpeckerci/plugin-trivy
settings: settings:
image_ref: "gitea:3000/homelab/docs:sha-${CI_COMMIT_SHA:0:8}" image_ref: "localhost:3000/homelab/docs:sha-${CI_COMMIT_SHA:0:8}"
severity: HIGH,CRITICAL severity: HIGH,CRITICAL
exit_code: 0 exit_code: 0
output: docs-scan.json output: docs-scan.json
@@ -151,8 +151,8 @@ steps:
- name: build-push-api - name: build-push-api
image: woodpeckerci/plugin-docker-buildx image: woodpeckerci/plugin-docker-buildx
settings: settings:
repo: gitea:3000/homelab/api repo: localhost:3000/homelab/api
registry: gitea:3000 registry: localhost:3000
dockerfile: api/Dockerfile dockerfile: api/Dockerfile
context: . context: .
tags: tags:
@@ -170,7 +170,7 @@ steps:
- name: scan-api - name: scan-api
image: woodpeckerci/plugin-trivy image: woodpeckerci/plugin-trivy
settings: settings:
image_ref: "gitea:3000/homelab/api:sha-${CI_COMMIT_SHA:0:8}" image_ref: "localhost:3000/homelab/api:sha-${CI_COMMIT_SHA:0:8}"
severity: HIGH,CRITICAL severity: HIGH,CRITICAL
exit_code: 0 exit_code: 0
output: api-scan.json output: api-scan.json
@@ -184,8 +184,8 @@ steps:
- name: build-push-mc - name: build-push-mc
image: woodpeckerci/plugin-docker-buildx image: woodpeckerci/plugin-docker-buildx
settings: settings:
repo: gitea:3000/homelab/mc repo: localhost:3000/homelab/mc
registry: gitea:3000 registry: localhost:3000
dockerfile: rustfs/Dockerfile.mc dockerfile: rustfs/Dockerfile.mc
context: rustfs/ context: rustfs/
tags: tags:
@@ -274,11 +274,10 @@ steps:
- git fetch http://gitea:3000/homelab/stack.git main - git fetch http://gitea:3000/homelab/stack.git main
- git reset --hard FETCH_HEAD - git reset --hard FETCH_HEAD
- cp .env.bak .env 2>/dev/null || true - cp .env.bak .env 2>/dev/null || true
# Pull from Gitea registry and retag for compose # Retag registry images for compose
- TAG=sha-${CI_COMMIT_SHA:0:8} - TAG=sha-${CI_COMMIT_SHA:0:8}
- for SVC in notebooks zotero docs api mc; do - for SVC in notebooks zotero docs api mc; do
docker pull gitea:3000/homelab/$SVC:$TAG && docker tag localhost:3000/homelab/$SVC:$TAG fhirworx/$SVC:$TAG;
docker tag gitea:3000/homelab/$SVC:$TAG fhirworx/$SVC:$TAG;
done done
- sed -i "s/^COMMIT_SHA=.*/COMMIT_SHA=$TAG/" .env 2>/dev/null || echo "COMMIT_SHA=$TAG" >> .env - sed -i "s/^COMMIT_SHA=.*/COMMIT_SHA=$TAG/" .env 2>/dev/null || echo "COMMIT_SHA=$TAG" >> .env
- docker compose up -d --remove-orphans - docker compose up -d --remove-orphans

View File

@@ -5,8 +5,8 @@ steps:
- name: build-push-notebooks - name: build-push-notebooks
image: woodpeckerci/plugin-docker-buildx image: woodpeckerci/plugin-docker-buildx
settings: settings:
repo: gitea:3000/homelab/notebooks repo: localhost:3000/homelab/notebooks
registry: gitea:3000 registry: localhost:3000
dockerfile: notebooks/Dockerfile dockerfile: notebooks/Dockerfile
context: notebooks/ context: notebooks/
tags: tags:
@@ -24,8 +24,8 @@ steps:
- name: build-push-zotero - name: build-push-zotero
image: woodpeckerci/plugin-docker-buildx image: woodpeckerci/plugin-docker-buildx
settings: settings:
repo: gitea:3000/homelab/zotero repo: localhost:3000/homelab/zotero
registry: gitea:3000 registry: localhost:3000
dockerfile: zotero/Dockerfile dockerfile: zotero/Dockerfile
context: zotero/ context: zotero/
tags: tags:
@@ -51,8 +51,8 @@ steps:
- name: build-push-docs - name: build-push-docs
image: woodpeckerci/plugin-docker-buildx image: woodpeckerci/plugin-docker-buildx
settings: settings:
repo: gitea:3000/homelab/docs repo: localhost:3000/homelab/docs
registry: gitea:3000 registry: localhost:3000
dockerfile: docs/Dockerfile dockerfile: docs/Dockerfile
context: . context: .
tags: tags:
@@ -72,8 +72,8 @@ steps:
- name: build-push-api - name: build-push-api
image: woodpeckerci/plugin-docker-buildx image: woodpeckerci/plugin-docker-buildx
settings: settings:
repo: gitea:3000/homelab/api repo: localhost:3000/homelab/api
registry: gitea:3000 registry: localhost:3000
dockerfile: api/Dockerfile dockerfile: api/Dockerfile
context: . context: .
tags: tags:
@@ -91,8 +91,8 @@ steps:
- name: build-push-mc - name: build-push-mc
image: woodpeckerci/plugin-docker-buildx image: woodpeckerci/plugin-docker-buildx
settings: settings:
repo: gitea:3000/homelab/mc repo: localhost:3000/homelab/mc
registry: gitea:3000 registry: localhost:3000
dockerfile: rustfs/Dockerfile.mc dockerfile: rustfs/Dockerfile.mc
context: rustfs/ context: rustfs/
tags: tags:
@@ -110,7 +110,7 @@ steps:
- name: scan-notebooks - name: scan-notebooks
image: woodpeckerci/plugin-trivy image: woodpeckerci/plugin-trivy
settings: settings:
image_ref: "gitea:3000/homelab/notebooks:sha-${CI_COMMIT_SHA:0:8}" image_ref: "localhost:3000/homelab/notebooks:sha-${CI_COMMIT_SHA:0:8}"
severity: HIGH,CRITICAL severity: HIGH,CRITICAL
exit_code: 0 exit_code: 0
volumes: volumes:
@@ -121,7 +121,7 @@ steps:
- name: scan-zotero - name: scan-zotero
image: woodpeckerci/plugin-trivy image: woodpeckerci/plugin-trivy
settings: settings:
image_ref: "gitea:3000/homelab/zotero:sha-${CI_COMMIT_SHA:0:8}" image_ref: "localhost:3000/homelab/zotero:sha-${CI_COMMIT_SHA:0:8}"
severity: HIGH,CRITICAL severity: HIGH,CRITICAL
exit_code: 0 exit_code: 0
volumes: volumes:
@@ -132,7 +132,7 @@ steps:
- name: scan-api - name: scan-api
image: woodpeckerci/plugin-trivy image: woodpeckerci/plugin-trivy
settings: settings:
image_ref: "gitea:3000/homelab/api:sha-${CI_COMMIT_SHA:0:8}" image_ref: "localhost:3000/homelab/api:sha-${CI_COMMIT_SHA:0:8}"
severity: HIGH,CRITICAL severity: HIGH,CRITICAL
exit_code: 0 exit_code: 0
volumes: volumes:
@@ -149,8 +149,7 @@ steps:
- cd /home/kert/stack - cd /home/kert/stack
- TAG=sha-${CI_COMMIT_SHA:0:8} - TAG=sha-${CI_COMMIT_SHA:0:8}
- for SVC in notebooks zotero docs api mc; do - for SVC in notebooks zotero docs api mc; do
docker pull gitea:3000/homelab/$SVC:$TAG && docker tag localhost:3000/homelab/$SVC:$TAG fhirworx/$SVC:$TAG;
docker tag gitea:3000/homelab/$SVC:$TAG fhirworx/$SVC:$TAG;
done done
- sed -i "s/^COMMIT_SHA=.*/COMMIT_SHA=$TAG/" .env 2>/dev/null || echo "COMMIT_SHA=$TAG" >> .env - sed -i "s/^COMMIT_SHA=.*/COMMIT_SHA=$TAG/" .env 2>/dev/null || echo "COMMIT_SHA=$TAG" >> .env
- docker compose up -d --remove-orphans - docker compose up -d --remove-orphans