homelab/scripts/flame/script.sh

30 lines
557 B
Bash
Raw Normal View History

2023-08-05 14:49:09 +02:00
#!/bin/bash
# Template script not meant to be run
set -euo pipefail
source "$HL_LIB"
_assert_vars HL_DOMAIN;
_ch_001-make_dirs() {
mkdir -p ~/flame /data/flame;
}
_ch_002-copy_compose() {
export HL_GEN_PW="$(openssl rand -hex 12)";
cp $(_fill docker-compose.yml.templ) ~/flame/docker-compose.yml;
}
_ch_003-update_caddy() {
# overwrite the default landing page
cp landing.Caddyfile /etc/caddy/conf.d;
sudo systemctl reload caddy.service;
}
_ch_004-run-service() {
cd ~/flame;
docker-compose up -d;
}
_run_checkpoints;