Add container registry workflow with build script
This commit is contained in:
@@ -1,16 +1,11 @@
|
|||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
# Productie configuratie voor Dockge deployment
|
# Productie configuratie voor Dockge deployment
|
||||||
# Kopieer deze YAML naar Dockge bij het aanmaken van een nieuwe stack
|
# Gebruik de image van Gitea Container Registry
|
||||||
# De container wordt automatisch gebouwd vanuit de Gitea repository
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
questionnaire:
|
questionnaire:
|
||||||
build:
|
image: 10.0.10.205:3000/bert.hausmans/questionnaire:latest
|
||||||
context: http://10.0.10.205:3000/bert.hausmans/questionnaire.git#main
|
|
||||||
args:
|
|
||||||
# Wijzig deze datum om een rebuild te forceren
|
|
||||||
BUILD_DATE: "2026-01-06"
|
|
||||||
container_name: questionnaire
|
container_name: questionnaire
|
||||||
ports:
|
ports:
|
||||||
- "4000:4000"
|
- "4000:4000"
|
||||||
|
|||||||
26
scripts/build-and-push.sh
Executable file
26
scripts/build-and-push.sh
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Build and push Docker image to Gitea Container Registry
|
||||||
|
# Gebruik: ./scripts/build-and-push.sh [tag]
|
||||||
|
# Voorbeeld: ./scripts/build-and-push.sh latest
|
||||||
|
# ./scripts/build-and-push.sh v1.0.0
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Configuratie
|
||||||
|
REGISTRY="10.0.10.205:3000"
|
||||||
|
IMAGE_NAME="bert.hausmans/questionnaire"
|
||||||
|
TAG="${1:-latest}"
|
||||||
|
|
||||||
|
FULL_IMAGE="${REGISTRY}/${IMAGE_NAME}:${TAG}"
|
||||||
|
|
||||||
|
echo "🔨 Building image: ${FULL_IMAGE}"
|
||||||
|
docker build -t "${FULL_IMAGE}" .
|
||||||
|
|
||||||
|
echo "📤 Pushing image to registry..."
|
||||||
|
docker push "${FULL_IMAGE}"
|
||||||
|
|
||||||
|
echo "✅ Done! Image pushed: ${FULL_IMAGE}"
|
||||||
|
echo ""
|
||||||
|
echo "📋 In Dockge: klik op 'Update' om de nieuwe image te pullen"
|
||||||
|
|
||||||
Reference in New Issue
Block a user