feat: Adds auto-pull options to hpa with a default pull interval of 1 hour.

This commit is contained in:
2025-11-06 16:22:35 -05:00
parent b090430cd8
commit e0214a49d2
3 changed files with 26 additions and 14 deletions

View File

@@ -4,6 +4,8 @@
#
# This allows them all to be set / declared in one place, then those
# scripts just need to source this file to use them.
#
# All variables can be overriden by setting in your shell env.
# XDG vars.
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
@@ -13,6 +15,12 @@ XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
HPA_DOCKER_IMAGE="git.housh.dev/michael/swift-hpa"
HPA_DOCKER_TAG=${HPA_DOCKER_TAG:-"latest"}
# Auto pull options to be ran before running the hpa docker
# container, default is always pull new images and repositories.
HPA_AUTO_PULL=${HPA_AUTO_PULL:="1"}
HPA_AUTO_PULL_INTERVAL="3600" # 1 hour
HPA_AUTO_PULL_OPTS=${HPA_AUTO_PULL_OPTS:-"--all"}
HPA_CONFIG_DIR="$XDG_CONFIG_HOME/hpa"
HPA_DATA_DIR="$XDG_DATA_HOME/hpa"
HPA_PLAYBOOK_DIR="$HPA_DATA_DIR/playbook"
@@ -25,6 +33,9 @@ HPA_CONSULT_ORIGIN_BASE_URL=${CONSULT_ORIGIN_BASE_URL:-"ssh://git@git.housh.dev:
HPA_CONSULT_TEMPLATE_DIR=${HPA_DATA_DIR}/template
HPA_CONSULT_TEMPLATE_URL="ssh://git@git.housh.dev:2222/hhe/consult-template.git"
export HPA_AUTO_PULL
export HPA_AUTO_PULL_INTERVAL
export HPA_AUTO_PULL_OPTS
export HPA_CONSULTS_DIR
export HPA_CONSULT_ORIGIN_BASE_URL
export HPA_CONSULT_TEMPLATE_DIR