Files
greatbear/deploy.sh
T
tanshu 0ff90cde27 Rebuild deploy process on the project template
- Dockerfile: deps → builder → pb-downloader → runner stages, cross-arch
  (BUILDPLATFORM node stages, TARGETARCH PocketBase binary), Debian slim
  runner, VOLUME /app/pb_data, dual healthcheck, docker-entrypoint.sh
- docker-entrypoint.sh: bash supervisor replacing scripts/run-all.mjs
- Makefile: build-production (multi-arch push from git remote),
  build-check, build-check-local
- deploy.sh [tag]: make build-production then ansible-playbook with tag
- drop .env/.env.example (credentials live in ansible/vars/default.yml)
2026-09-03 10:24:48 +05:30

20 lines
647 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P )
cd "$parent_path" || exit
echo "========================================================"
echo " Building & Uploading Docker Image"
echo "========================================================"
current_version="${1:-latest}"
make build-production TAG="$current_version"
echo ""
echo "========================================================"
echo " Executing Ansible Deployment"
echo "========================================================"
cd "$parent_path/ansible" || exit
ansible-playbook playbook.yml -e "tag=$current_version"