docker release

This commit is contained in:
2026-09-06 17:35:22 +12:00
parent ee51d3983a
commit 15a19cfb44
7 changed files with 472 additions and 0 deletions

81
bkp/fennec.sh Normal file
View File

@@ -0,0 +1,81 @@
#!/bin/bash
set -e
BASE_DIR="/home/fennec-hub"
update() {
echo "========================================"
echo "Updating Git repositories..."
echo "========================================"
for repo in \
fennec-hub-platfrom \
fennec-hub-multi-tenant-shared-db \
fennec-hub-angular-ui \
fennec-hub-commerce
do
echo "Pulling $repo..."
cd "$BASE_DIR/$repo"
git pull
done
echo "Git update completed."
}
build() {
echo "========================================"
echo "Building Docker images..."
echo "========================================"
cd "$BASE_DIR"
docker compose build
}
deploy() {
echo "========================================"
echo "Starting backend and frontend..."
echo "========================================"
cd "$BASE_DIR"
docker compose up -d
}
logs() {
docker logs -f fennec-backend
}
usage() {
echo "Usage: $(basename "$0") {update|build|deploy|logs|all}"
echo
echo "Commands:"
echo " update Pull latest changes from all Git repositories"
echo " build Build Docker images"
echo " deploy Start backend and frontend"
echo " logs Follow backend logs"
echo " all Update, build, and deploy"
}
case "$1" in
update)
update
;;
build)
build
;;
deploy)
deploy
;;
logs)
logs
;;
all)
update
build
deploy
;;
*)
usage
exit 1
;;
esac