krops-lamassu/deploy.sh
padreug 6febf28955 Initial commit: krops-lamassu deployment template
NixOS deployment template for Lamassu Bitcoin ATM server using
nix-bitcoin and krops.

Features:
- Lamassu server with PostgreSQL and auto-generated secrets
- TLS certificates (self-signed)
- Test VM for local development
- Template structure for easy customization
2026-01-11 23:57:22 +01:00

33 lines
766 B
Bash
Executable file

#!/usr/bin/env bash
# Deploy nix-bitcoin node
#
# Usage:
# ./deploy.sh # Build and deploy to target
# ./deploy.sh test # Test build only (no deploy)
# ./deploy.sh vm # Build and run test VM
set -euo pipefail
cd "$(dirname "$0")"
case "${1:-deploy}" in
test)
echo "Testing build..."
nix-build krops.nix -A test --no-out-link
echo "Test build complete. Check /tmp/krops-test"
;;
vm)
echo "Building test VM..."
result=$(nix-build krops.nix -A vm --no-out-link)
echo "Starting VM..."
echo "Access admin UI at: https://localhost:8443"
"$result"/bin/run-*-vm
;;
deploy | *)
echo "Building deployment..."
result=$(nix-build krops.nix -A deploy --no-out-link)
echo "Deploying..."
"$result"
echo "Done!"
;;
esac