Push images via internal Gitea port 3000, bypass Cloudflare/Traefik
Build & Deploy / build-and-deploy (push) Successful in 26s
Build & Deploy / build-and-deploy (push) Successful in 26s
Pushes go to 192.168.86.31:3000 (HTTP, insecure-registry). Deploy pulls from same internal address. Requires on alu: insecure-registries: ["192.168.86.31:3000"] in /etc/docker/daemon.json Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,9 @@ on:
|
|||||||
branches: [master]
|
branches: [master]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
# Intern adresse — bypasser Traefik og Cloudflare
|
||||||
|
REGISTRY_INTERNAL: 192.168.86.31:3000
|
||||||
|
# Ekstern adresse — brukes i image-tags (samme registry, annen hostname)
|
||||||
REGISTRY: gitea.theriise.net
|
REGISTRY: gitea.theriise.net
|
||||||
BACKEND_IMAGE: gitea.theriise.net/steinhelge/timing/backend
|
BACKEND_IMAGE: gitea.theriise.net/steinhelge/timing/backend
|
||||||
FRONTEND_IMAGE: gitea.theriise.net/steinhelge/timing/frontend
|
FRONTEND_IMAGE: gitea.theriise.net/steinhelge/timing/frontend
|
||||||
@@ -16,10 +19,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Log in to Gitea Container Registry
|
- name: Log in to Gitea Container Registry (intern rute)
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY_INTERNAL }}
|
||||||
username: ${{ secrets.REGISTRY_USER }}
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
@@ -28,14 +31,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ env.BACKEND_IMAGE }}:latest
|
tags: ${{ env.REGISTRY_INTERNAL }}/steinhelge/timing/backend:latest
|
||||||
|
|
||||||
- name: Build & push frontend
|
- name: Build & push frontend
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ./frontend
|
context: ./frontend
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ env.FRONTEND_IMAGE }}:latest
|
tags: ${{ env.REGISTRY_INTERNAL }}/steinhelge/timing/frontend:latest
|
||||||
|
|
||||||
- name: Deploy to server
|
- name: Deploy to server
|
||||||
uses: appleboy/ssh-action@v1
|
uses: appleboy/ssh-action@v1
|
||||||
|
|||||||
Reference in New Issue
Block a user