- API: PHP 8.4, composer install --no-scripts + dump-autoload after COPY - Admin: fix TS (Event.upload_password, unused router, api XSRF, window.open) - Upload: Uppy v5 (hideProgressDetails, headers, destroy), unused watch, api XSRF - Build script: loop over api/admin/upload, push :latest as well as VERSION - Deploy: MySQL from docker.io, platform linux/amd64; README troubleshooting Co-authored-by: Cursor <cursoragent@cursor.com>
43 lines
1.4 KiB
Bash
Executable File
43 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# Build and push event-uploader Docker images to Gitea container registry.
|
|
# One-time: docker login 10.0.10.205:3000 (username: bert.hausmans, password: token or password).
|
|
# Usage: ./scripts/docker-build-push.sh [VERSION]
|
|
# VERSION defaults to "latest" (or git describe --tags --always if available).
|
|
# Run from project root.
|
|
|
|
set -e
|
|
REGISTRY="${REGISTRY:-10.0.10.205:3000}"
|
|
OWNER="${OWNER:-bert.hausmans}"
|
|
|
|
cd "$(dirname "$0")/.."
|
|
ROOT="$(pwd)"
|
|
|
|
if [ -n "$1" ]; then
|
|
VERSION="$1"
|
|
else
|
|
VERSION=$(git describe --tags --always 2>/dev/null || echo "latest")
|
|
fi
|
|
|
|
echo "Building and pushing images with tag: $VERSION"
|
|
echo "Registry: $REGISTRY, Owner: $OWNER"
|
|
echo ""
|
|
|
|
for name in api admin upload; do
|
|
docker build -t "$REGISTRY/$OWNER/event-uploader-$name:$VERSION" "$ROOT/$name"
|
|
docker push "$REGISTRY/$OWNER/event-uploader-$name:$VERSION"
|
|
if [ "$VERSION" != "latest" ]; then
|
|
docker tag "$REGISTRY/$OWNER/event-uploader-$name:$VERSION" "$REGISTRY/$OWNER/event-uploader-$name:latest"
|
|
docker push "$REGISTRY/$OWNER/event-uploader-$name:latest"
|
|
fi
|
|
done
|
|
|
|
echo ""
|
|
echo "Done. Images pushed:"
|
|
echo " $REGISTRY/$OWNER/event-uploader-api:$VERSION"
|
|
echo " $REGISTRY/$OWNER/event-uploader-admin:$VERSION"
|
|
echo " $REGISTRY/$OWNER/event-uploader-upload:$VERSION"
|
|
if [ "$VERSION" != "latest" ]; then
|
|
echo " (also tagged and pushed as :latest)"
|
|
fi
|
|
echo "On Dockge: set TAG=$VERSION (or TAG=latest) in stack .env, then Pull and Redeploy."
|