- 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)
20 lines
647 B
Bash
Executable File
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"
|