Files
Provisioning/deploy/install.sh
T
josh 76b9f64141
build-and-push / test (push) Successful in 36s
build-and-push / build-and-push (push) Successful in 1m8s
Remove keys volume mount and add install script
- Remove /etc/provisioning/keys mount (ephemeral keys are in-memory now)
- Remove /etc/provisioning VOLUME from Dockerfile
- Add deploy/install.sh that creates config files before docker compose up,
  preventing Docker from creating directories in place of missing bind mounts
- Update README with install script usage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-09 20:48:35 -04:00

32 lines
961 B
Bash

#!/usr/bin/env bash
set -euo pipefail
DEPLOY_DIR="${1:-/opt/provisioning}"
mkdir -p "$DEPLOY_DIR"
cd "$DEPLOY_DIR"
REPO_RAW="https://gitea.thewrightserver.net/josh/Provisioning/raw/branch/main"
# Always pull latest compose file
curl -sfO "$REPO_RAW/docker-compose.yml"
# Create config files from examples if they don't exist
if [ ! -f provisioning.yaml ]; then
curl -sf "$REPO_RAW/deploy/provisioning.example.yaml" -o provisioning.yaml
echo "Created provisioning.yaml — edit it with your values before starting."
fi
if [ ! -f server-types.yaml ]; then
curl -sf "$REPO_RAW/deploy/server-types.example.yaml" -o server-types.yaml
echo "Created server-types.yaml — edit it with your hardware types."
fi
echo ""
echo "Deploy directory: $DEPLOY_DIR"
echo ""
echo "Next steps:"
echo " 1. Edit provisioning.yaml with your network/cluster settings"
echo " 2. Edit server-types.yaml with your hardware types"
echo " 3. docker compose up -d"