Add container registry workflow with build script

This commit is contained in:
2026-01-06 02:21:23 +01:00
parent c5cdce28e9
commit 075a0f9f79
2 changed files with 28 additions and 7 deletions

View File

@@ -1,16 +1,11 @@
version: '3.8'
# Productie configuratie voor Dockge deployment
# Kopieer deze YAML naar Dockge bij het aanmaken van een nieuwe stack
# De container wordt automatisch gebouwd vanuit de Gitea repository
# Gebruik de image van Gitea Container Registry
services:
questionnaire:
build:
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"
image: 10.0.10.205:3000/bert.hausmans/questionnaire:latest
container_name: questionnaire
ports:
- "4000:4000"

26
scripts/build-and-push.sh Executable file
View 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"