commit 680cdbe4b52fd865c9ed3d688df8311a65f7bfa0 Author: ghe0 Date: Sat Mar 8 04:42:53 2025 +0200 first push diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1944fd6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.tmp diff --git a/gitea/deploy_gitea.sh b/gitea/deploy_gitea.sh new file mode 100755 index 0000000..35c6fbd --- /dev/null +++ b/gitea/deploy_gitea.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +hostname=gitea-example + +set -e +export FORMAT=YAML + +vm_info="$(detee-cli vm deploy --public-ip --location Vancouver --hostname ${hostname})" +echo vm_info: +echo $vm_info + +vm_uuid=$(echo $vm_info | grep 'uuid:' | awk '{ print $2 }') + +vm_ip=$(echo $vm_info | grep 'ip:' | awk '{ print $2 }') +key_path=$(echo $vm_info | grep 'key_path:' | awk '{ print $2 }') +ssh_command="ssh -i $key_path -p 22 root@${vm_ip}" + +$ssh_command pacman -Syu --noconfirm +$ssh_command pacman -S --noconfirm gitea +$ssh_command systemctl start gitea + +echo "To access gitea, visit http://${vm_ip}:3000/" +echo "To SSH into the VM, run:" +echo " detee-cli vm ssh ${vm_uuid}" +echo "The VM will be up for 1 hour (using your LPs). Delete it by running:" +echo " detee-cli vm delete ${vm_uuid}"