homelab/scripts/nextcloud/script.sh
2022-12-31 14:23:33 +01:00

28 lines
538 B
Bash

#!/bin/bash
set -euo pipefail
source "$HL_LIB"
_assert_vars HL_TIMEZONE HL_DOMAIN;
_ch_001-make_dirs() {
mkdir -p ~/nextcloud /data/nextcloud;
}
_ch_002-copy_compose() {
cp $(_fill docker-compose.yml.templ) ~/nextcloud/docker-compose.yml;
}
_ch_003-update_caddy() {
cp $(_fill Caddyfile.templ) /etc/caddy/conf.d/nextcloud.Caddyfile;
chmod a+r /etc/caddy/conf.d/nextcloud.Caddyfile;
sudo systemctl reload caddy.service;
}
_ch_004-run_service() {
cd ~/nextcloud;
docker-compose up -d;
}
_run_checkpoints