forked from DevOps/deploy.stack
refactor(hindsight): 使用Volumes_Path替代硬编码路径
- backup.job 改为从 env.cfg 读取 Volumes_Path - stack.yml 路径替换为变量引用 - .gitignore 添加 hindsight/env.cfg
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -25,8 +25,8 @@ crontab/debug_*.py
|
||||
crontab/test_*.py
|
||||
crontab/test*.py
|
||||
g-b/*
|
||||
.gitignore
|
||||
mcptime/go.sum
|
||||
mcpTimeServer/go.sum
|
||||
mcp_server_go/config.toml
|
||||
compare_images.py
|
||||
hindsight/env.cfg
|
||||
|
||||
@@ -6,7 +6,11 @@
|
||||
# ============================================================
|
||||
set -euo pipefail
|
||||
|
||||
BACKUP_DIR="/home/geng/hindsight/backups"
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
# shellcheck source=/dev/null
|
||||
source "${SCRIPT_DIR}/env.cfg"
|
||||
|
||||
BACKUP_DIR="${Volumes_Path}/backups"
|
||||
KEEP_DAYS=7
|
||||
TS=$(date +%Y%m%d_%H%M%S)
|
||||
FNAME="hindsight_db_${TS}.sql.gz"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Hindsight 部署栈
|
||||
# ============================================================
|
||||
# 部署前准备(仅首次):
|
||||
# mkdir -pv /home/geng/hindsight/pgdata /home/geng/hindsight/backups
|
||||
# sudo chown -R 999:999 /home/geng/hindsight/pgdata
|
||||
# mkdir -pv ${Volumes_Path}/pgdata ${Volumes_Path}/backups
|
||||
# sudo chown -R 999:999 ${Volumes_Path}/pgdata
|
||||
# cp env.cfg.example env.cfg && $EDITOR env.cfg # 填入密码/API Key
|
||||
#
|
||||
# pull:: docker compose --env-file ./hindsight/env.cfg -f ./hindsight/stack.yml pull
|
||||
|
||||
Reference in New Issue
Block a user