fix deploy: revert to localhost:3000 for buildx registry
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:
@@ -41,8 +41,8 @@ steps:
|
||||
- name: build-push-notebooks
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
repo: gitea:3000/homelab/notebooks
|
||||
registry: gitea:3000
|
||||
repo: localhost:3000/homelab/notebooks
|
||||
registry: localhost:3000
|
||||
dockerfile: notebooks/Dockerfile
|
||||
context: notebooks/
|
||||
tags:
|
||||
@@ -60,7 +60,7 @@ steps:
|
||||
- name: scan-notebooks
|
||||
image: woodpeckerci/plugin-trivy
|
||||
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
|
||||
exit_code: 0
|
||||
output: notebooks-scan.json
|
||||
@@ -74,8 +74,8 @@ steps:
|
||||
- name: build-push-zotero
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
repo: gitea:3000/homelab/zotero
|
||||
registry: gitea:3000
|
||||
repo: localhost:3000/homelab/zotero
|
||||
registry: localhost:3000
|
||||
dockerfile: zotero/Dockerfile
|
||||
context: zotero/
|
||||
tags:
|
||||
@@ -93,7 +93,7 @@ steps:
|
||||
- name: scan-zotero
|
||||
image: woodpeckerci/plugin-trivy
|
||||
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
|
||||
exit_code: 0
|
||||
output: zotero-scan.json
|
||||
@@ -116,8 +116,8 @@ steps:
|
||||
- name: build-push-docs
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
repo: gitea:3000/homelab/docs
|
||||
registry: gitea:3000
|
||||
repo: localhost:3000/homelab/docs
|
||||
registry: localhost:3000
|
||||
dockerfile: docs/Dockerfile
|
||||
context: .
|
||||
tags:
|
||||
@@ -137,7 +137,7 @@ steps:
|
||||
- name: scan-docs
|
||||
image: woodpeckerci/plugin-trivy
|
||||
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
|
||||
exit_code: 0
|
||||
output: docs-scan.json
|
||||
@@ -151,8 +151,8 @@ steps:
|
||||
- name: build-push-api
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
repo: gitea:3000/homelab/api
|
||||
registry: gitea:3000
|
||||
repo: localhost:3000/homelab/api
|
||||
registry: localhost:3000
|
||||
dockerfile: api/Dockerfile
|
||||
context: .
|
||||
tags:
|
||||
@@ -170,7 +170,7 @@ steps:
|
||||
- name: scan-api
|
||||
image: woodpeckerci/plugin-trivy
|
||||
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
|
||||
exit_code: 0
|
||||
output: api-scan.json
|
||||
@@ -184,8 +184,8 @@ steps:
|
||||
- name: build-push-mc
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
repo: gitea:3000/homelab/mc
|
||||
registry: gitea:3000
|
||||
repo: localhost:3000/homelab/mc
|
||||
registry: localhost:3000
|
||||
dockerfile: rustfs/Dockerfile.mc
|
||||
context: rustfs/
|
||||
tags:
|
||||
@@ -274,11 +274,10 @@ steps:
|
||||
- git fetch http://gitea:3000/homelab/stack.git main
|
||||
- git reset --hard FETCH_HEAD
|
||||
- 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}
|
||||
- for SVC in notebooks zotero docs api mc; do
|
||||
docker pull gitea:3000/homelab/$SVC:$TAG &&
|
||||
docker tag gitea:3000/homelab/$SVC:$TAG fhirworx/$SVC:$TAG;
|
||||
docker tag localhost:3000/homelab/$SVC:$TAG fhirworx/$SVC:$TAG;
|
||||
done
|
||||
- sed -i "s/^COMMIT_SHA=.*/COMMIT_SHA=$TAG/" .env 2>/dev/null || echo "COMMIT_SHA=$TAG" >> .env
|
||||
- docker compose up -d --remove-orphans
|
||||
|
||||
@@ -5,8 +5,8 @@ steps:
|
||||
- name: build-push-notebooks
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
repo: gitea:3000/homelab/notebooks
|
||||
registry: gitea:3000
|
||||
repo: localhost:3000/homelab/notebooks
|
||||
registry: localhost:3000
|
||||
dockerfile: notebooks/Dockerfile
|
||||
context: notebooks/
|
||||
tags:
|
||||
@@ -24,8 +24,8 @@ steps:
|
||||
- name: build-push-zotero
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
repo: gitea:3000/homelab/zotero
|
||||
registry: gitea:3000
|
||||
repo: localhost:3000/homelab/zotero
|
||||
registry: localhost:3000
|
||||
dockerfile: zotero/Dockerfile
|
||||
context: zotero/
|
||||
tags:
|
||||
@@ -51,8 +51,8 @@ steps:
|
||||
- name: build-push-docs
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
repo: gitea:3000/homelab/docs
|
||||
registry: gitea:3000
|
||||
repo: localhost:3000/homelab/docs
|
||||
registry: localhost:3000
|
||||
dockerfile: docs/Dockerfile
|
||||
context: .
|
||||
tags:
|
||||
@@ -72,8 +72,8 @@ steps:
|
||||
- name: build-push-api
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
repo: gitea:3000/homelab/api
|
||||
registry: gitea:3000
|
||||
repo: localhost:3000/homelab/api
|
||||
registry: localhost:3000
|
||||
dockerfile: api/Dockerfile
|
||||
context: .
|
||||
tags:
|
||||
@@ -91,8 +91,8 @@ steps:
|
||||
- name: build-push-mc
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
repo: gitea:3000/homelab/mc
|
||||
registry: gitea:3000
|
||||
repo: localhost:3000/homelab/mc
|
||||
registry: localhost:3000
|
||||
dockerfile: rustfs/Dockerfile.mc
|
||||
context: rustfs/
|
||||
tags:
|
||||
@@ -110,7 +110,7 @@ steps:
|
||||
- name: scan-notebooks
|
||||
image: woodpeckerci/plugin-trivy
|
||||
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
|
||||
exit_code: 0
|
||||
volumes:
|
||||
@@ -121,7 +121,7 @@ steps:
|
||||
- name: scan-zotero
|
||||
image: woodpeckerci/plugin-trivy
|
||||
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
|
||||
exit_code: 0
|
||||
volumes:
|
||||
@@ -132,7 +132,7 @@ steps:
|
||||
- name: scan-api
|
||||
image: woodpeckerci/plugin-trivy
|
||||
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
|
||||
exit_code: 0
|
||||
volumes:
|
||||
@@ -149,8 +149,7 @@ steps:
|
||||
- cd /home/kert/stack
|
||||
- TAG=sha-${CI_COMMIT_SHA:0:8}
|
||||
- for SVC in notebooks zotero docs api mc; do
|
||||
docker pull gitea:3000/homelab/$SVC:$TAG &&
|
||||
docker tag gitea:3000/homelab/$SVC:$TAG fhirworx/$SVC:$TAG;
|
||||
docker tag localhost:3000/homelab/$SVC:$TAG fhirworx/$SVC:$TAG;
|
||||
done
|
||||
- sed -i "s/^COMMIT_SHA=.*/COMMIT_SHA=$TAG/" .env 2>/dev/null || echo "COMMIT_SHA=$TAG" >> .env
|
||||
- docker compose up -d --remove-orphans
|
||||
|
||||
Reference in New Issue
Block a user