mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
feat: Updates hpa and config to mount home directory inside container.
This commit is contained in:
16
env/.local/scripts/hpa
vendored
16
env/.local/scripts/hpa
vendored
@@ -9,6 +9,17 @@ set -o pipefail
|
||||
#
|
||||
# Make sure to run 'hpa-init' first on this machine to setup
|
||||
# dependencies, if you have not done so already.
|
||||
#
|
||||
# This will mount my home directory inside the container, so
|
||||
# it should somewhat mirror like commands are run on the host os.
|
||||
#
|
||||
# To attach to a shell inside the container run:
|
||||
# `hpa bash`
|
||||
#
|
||||
# To run ansible vault commands inside the container run:
|
||||
# `hpa ansible-vault ...`
|
||||
#
|
||||
#
|
||||
|
||||
SCRIPTS=${SCRIPTS:-$HOME/.local/scripts}
|
||||
. "$SCRIPTS/utils/hpa/hpa.env"
|
||||
@@ -27,9 +38,6 @@ if [[ $HPA_AUTO_PULL == "1" ]] && [[ $diff -gt "$HPA_AUTO_PULL_INTERVAL" ]]; the
|
||||
fi
|
||||
|
||||
podman run --rm --interactive --tty \
|
||||
--volume "$HPA_DATA_DIR/template":/template \
|
||||
--volume "$HPA_DATA_DIR/playbook":/playbook \
|
||||
--volume "$HPA_CONFIG_DIR":/config/hpa \
|
||||
--volume "$HPA_CONSULTS_DIR":/consults \
|
||||
--volume "$HOME":/root \
|
||||
--secret "$HPA_VAULT_SECRET_KEY" \
|
||||
"$HPA_DOCKER_IMAGE:$HPA_DOCKER_TAG" "$@"
|
||||
|
||||
2
env/.local/scripts/hpa-pull
vendored
2
env/.local/scripts/hpa-pull
vendored
@@ -105,4 +105,4 @@ fi
|
||||
[[ $docker_flag == "1" ]] && pull-docker
|
||||
[[ $playbook_flag == "1" ]] && pull-playbook
|
||||
[[ $template_flag == "1" ]] && pull-template
|
||||
echo "$(date +%s)" >>$HPA_CONFIG_DIR/.lastpull
|
||||
date +%s >"$HPA_CONFIG_DIR/.lastpull"
|
||||
|
||||
Reference in New Issue
Block a user