- Remove opencode; install nvm, Claude Code, and pi-coding-agent for aicoder - Add muxplex as web terminal service behind Pangolin (auth: none, port 8088) - Add JuiceFS (Docker container with FUSE) backed by S3 + Redis for Nextcloud storage - Add Nextcloud + MariaDB with JuiceFS mount via depends_on chain - Add autoheal container to restart unhealthy services (covers stale FUSE mounts) - Add SSH key for aicoder user, uv for aicoder, cron cleanup script - Pin images: major for stable projects, minor for Pangolin/Gerbil - Query JuiceFS S3 credentials and cache size during init Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
982 B
Bash
Executable file
18 lines
982 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
echo "=== Phase 3: Copying files and running playbook ==="
|
|
|
|
rsync -az --exclude '.git' "$SCRIPT_DIR/" "$NEW_USER@pangolin.$HOST:~/server_init/"
|
|
|
|
EXTRA_VARS="base_domain=$HOST"
|
|
EXTRA_VARS="$EXTRA_VARS ssh_pubkey=\"$PUBKEY\""
|
|
EXTRA_VARS="$EXTRA_VARS juicefs_s3_endpoint=$JUICEFS_S3_ENDPOINT"
|
|
EXTRA_VARS="$EXTRA_VARS juicefs_s3_bucket=$JUICEFS_S3_BUCKET"
|
|
EXTRA_VARS="$EXTRA_VARS juicefs_s3_access_key=$JUICEFS_S3_ACCESS_KEY"
|
|
EXTRA_VARS="$EXTRA_VARS juicefs_s3_secret_key=$JUICEFS_S3_SECRET_KEY"
|
|
EXTRA_VARS="$EXTRA_VARS juicefs_cache_size=$JUICEFS_CACHE_SIZE"
|
|
|
|
ssh -t "$NEW_USER@pangolin.$HOST" \
|
|
"bash -c 'sudo locale-gen en_US.UTF-8 && if ! command -v ansible &>/dev/null; then echo \"Installing Ansible...\"; sudo apt-get update && sudo apt-get install -y ansible-core python3-pip; fi && echo \"Running Ansible playbook...\" && cd ~/server_init && LC_ALL=en_US.UTF-8 ansible-playbook -i localhost, -c local playbook.yml -e \"$EXTRA_VARS\" --ask-become-pass'"
|