Files
proxmox/scripts/mifos/install-mifos-docker-in-5800.sh
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

43 lines
2.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Install Docker and Mifos X 24.04.30 (Docker + MariaDB) inside LXC 5800 on r630-02.
# Run from project root: ./scripts/mifos/install-mifos-docker-in-5800.sh
# Or via SSH: ssh root@192.168.11.12 'bash -s' < scripts/mifos/install-mifos-docker-in-5800.sh (with PROXMOX_HOST_R630_02 and VMID set)
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
[ -f "${PROJECT_ROOT}/.env" ] && set +u && source "${PROJECT_ROOT}/.env" 2>/dev/null || true && set -u
HOST="${PROXMOX_HOST_R630_02:-192.168.11.12}"
VMID="${MIFOS_VMID:-5800}"
SSH_OPTS="-o ConnectTimeout=15 -o StrictHostKeyChecking=accept-new"
# Script to run inside the container
INNER_SCRIPT='
set -e
export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get install -y -qq ca-certificates curl unzip
# Docker via convenience script (works in LXC with nesting)
curl -fsSL https://get.docker.com | sh
cd /tmp
if [ ! -f mifosplatform-24.04.30.RELEASE.zip ]; then
curl -fsSL -o mifosplatform-24.04.30.RELEASE.zip "https://sourceforge.net/projects/mifos/files/Mifos%20X/mifosplatform-24.04.30.RELEASE.zip/download" || \
wget -q -O mifosplatform-24.04.30.RELEASE.zip "https://sourceforge.net/projects/mifos/files/Mifos%20X/mifosplatform-24.04.30.RELEASE.zip/download" || true
fi
if [ -f mifosplatform-24.04.30.RELEASE.zip ]; then
unzip -o -q mifosplatform-24.04.30.RELEASE.zip
cd mifosplatform-24.04.30.RELEASE/docker/mifosx-mariadb
docker compose pull
docker compose up -d
echo "Mifos X 24.04.30 started. App on port 80. Login: mifos / password"
else
echo "Download failed; run manually inside container: curl -L -o mifosplatform-24.04.30.RELEASE.zip https://sourceforge.net/projects/mifos/files/Mifos%20X/mifosplatform-24.04.30.RELEASE.zip/download"
fi
'
echo "Installing Docker + Mifos X 24.04.30 in LXC $VMID on $HOST..."
ssh $SSH_OPTS root@$HOST "pct exec $VMID -- bash -s" <<< "$INNER_SCRIPT"
echo "Done. Check: ssh root@$HOST 'pct exec $VMID -- docker ps'"
echo "See: docs/04-configuration/MIFOS_R630_02_DEPLOYMENT.md"