Initial commit (I feel unsafe)
This commit is contained in:
25
actual_server-setup
Normal file
25
actual_server-setup
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=actual_server-env
|
||||
. "${HOME}"/"${USER}"-env
|
||||
|
||||
echo -e "\n[+] setting up actual\n\n-------\n"
|
||||
|
||||
mkdir -p "${VOLUME_PATH}"
|
||||
|
||||
envsubst <"${HOME}"/"${USER}"-compose_template.yaml >"${HOME}"/"${USER}"-compose.yaml
|
||||
|
||||
sudo docker compose -f "${HOME}"/"${USER}"-compose.yaml up -d
|
||||
|
||||
echo "[/] waiting for migrations to run..."
|
||||
sleep 10 # wait for migrations to run
|
||||
|
||||
echo "[+] restoring backup data"
|
||||
|
||||
sudo docker compose -f "${HOME}"/"${USER}"-compose.yaml stop
|
||||
|
||||
rm -r "${VOLUME_PATH:?}"/*
|
||||
|
||||
rclone copy "${BUCKET_PATH}" "${VOLUME_PATH}" -v
|
||||
|
||||
sudo docker compose -f "${HOME}"/"${USER}"-compose.yaml start
|
||||
Reference in New Issue
Block a user