homelab/scripts/paperlessngx/script.sh

29 lines
593 B
Bash
Raw Normal View History

2022-12-31 14:19:03 +01:00
#!/bin/bash
set -euo pipefail
source "$HL_LIB"
_assert_vars HL_TIMEZONE HL_DOMAIN;
_ch_001-make_dirs() {
mkdir -p ~/paperlessngx /data/paperlessngx;
}
_ch_002-copy_compose() {
cp docker-compose.yml ~/paperlessngx/docker-compose.yml;
export HL_PAPERLESS_SECRET="$(openssl rand -hex 24)";
cp $(_fill docker-compose.env.templ) ~/paperlessngx/docker-compose.env;
}
_ch_003-update_caddy() {
cp paperlessngx.Caddyfile /etc/caddy/conf.d;
2022-12-31 14:19:03 +01:00
sudo systemctl reload caddy.service;
}
_ch_004-run_service() {
cd ~/paperlessngx;
docker-compose up -d;
}
_run_checkpoints