Add dynamic AI Workspace run profiles
This commit is contained in:
@@ -46,6 +46,7 @@ rsync_dir "${NAS_ROOT}/authentik/custom-templates/" "${BACKUP_DIR}/files/authent
|
||||
rsync_dir "${NAS_ROOT}/platform/authentik/" "${BACKUP_DIR}/files/platform/authentik/"
|
||||
rsync_dir "${NAS_ROOT}/platform/notification-core/" "${BACKUP_DIR}/files/platform/notification-core/"
|
||||
rsync_dir "${NAS_ROOT}/platform/ai-workspace-hub/" "${BACKUP_DIR}/files/platform/ai-workspace-hub/"
|
||||
rsync_dir "${NAS_ROOT}/platform/ai-workspace-assistant/" "${BACKUP_DIR}/files/platform/ai-workspace-assistant/"
|
||||
|
||||
rsync_file "${NAS_ROOT}/platform/.env.synology" "${BACKUP_DIR}/files/platform/"
|
||||
rsync_file "${NAS_ROOT}/platform/.env.synology.example" "${BACKUP_DIR}/files/platform/"
|
||||
@@ -73,6 +74,7 @@ Contains:
|
||||
- Platform runtime config: platform/.env.synology, compose, Caddyfile
|
||||
- Notification Core source/config: platform/notification-core, platform compose/env
|
||||
- AI Workspace Hub source/config: platform/ai-workspace-hub, platform compose/env
|
||||
- AI Workspace Assistant source/config: platform/ai-workspace-assistant, platform compose/env
|
||||
- Tasker runtime config: tasker/plane-app/.env.synology, compose, Synology override
|
||||
- Ops Agents Gateway runtime config: ops-agents/.env, compose
|
||||
|
||||
@@ -101,8 +103,24 @@ sudo "${DOCKER_BIN}" compose \\
|
||||
--env-file "${ENV_FILE}" \\
|
||||
-f "${COMPOSE_FILE}" \\
|
||||
exec -T postgresql-authentik \\
|
||||
sh -lc 'pg_restore --list /dev/stdin >/dev/null' \\
|
||||
< "\${BACKUP_DIR}/authentik-postgres.dump"
|
||||
rm -f /tmp/authentik-postgres.dump
|
||||
|
||||
sudo "${DOCKER_BIN}" compose \\
|
||||
--env-file "${ENV_FILE}" \\
|
||||
-f "${COMPOSE_FILE}" \\
|
||||
cp "\${BACKUP_DIR}/authentik-postgres.dump" postgresql-authentik:/tmp/authentik-postgres.dump
|
||||
|
||||
sudo "${DOCKER_BIN}" compose \\
|
||||
--env-file "${ENV_FILE}" \\
|
||||
-f "${COMPOSE_FILE}" \\
|
||||
exec -T postgresql-authentik \\
|
||||
pg_restore --list /tmp/authentik-postgres.dump >/dev/null
|
||||
|
||||
sudo "${DOCKER_BIN}" compose \\
|
||||
--env-file "${ENV_FILE}" \\
|
||||
-f "${COMPOSE_FILE}" \\
|
||||
exec -T postgresql-authentik \\
|
||||
rm -f /tmp/authentik-postgres.dump
|
||||
|
||||
if command -v sha256sum >/dev/null 2>&1; then
|
||||
(cd "\${BACKUP_DIR}" && sha256sum authentik-postgres.dump > SHA256SUMS)
|
||||
@@ -132,8 +150,24 @@ sudo "${DOCKER_BIN}" compose \\
|
||||
--env-file "${ENV_FILE}" \\
|
||||
-f "${COMPOSE_FILE}" \\
|
||||
exec -T notification-postgres \\
|
||||
sh -lc 'pg_restore --list /dev/stdin >/dev/null' \\
|
||||
< "\${BACKUP_DIR}/notification-postgres.dump"
|
||||
rm -f /tmp/notification-postgres.dump
|
||||
|
||||
sudo "${DOCKER_BIN}" compose \\
|
||||
--env-file "${ENV_FILE}" \\
|
||||
-f "${COMPOSE_FILE}" \\
|
||||
cp "\${BACKUP_DIR}/notification-postgres.dump" notification-postgres:/tmp/notification-postgres.dump
|
||||
|
||||
sudo "${DOCKER_BIN}" compose \\
|
||||
--env-file "${ENV_FILE}" \\
|
||||
-f "${COMPOSE_FILE}" \\
|
||||
exec -T notification-postgres \\
|
||||
pg_restore --list /tmp/notification-postgres.dump >/dev/null
|
||||
|
||||
sudo "${DOCKER_BIN}" compose \\
|
||||
--env-file "${ENV_FILE}" \\
|
||||
-f "${COMPOSE_FILE}" \\
|
||||
exec -T notification-postgres \\
|
||||
rm -f /tmp/notification-postgres.dump
|
||||
|
||||
echo "notification-db-dump-ok: \${BACKUP_DIR}/notification-postgres.dump"
|
||||
EOF
|
||||
@@ -158,8 +192,18 @@ sudo "${DOCKER_BIN}" "\${compose_args[@]}" \\
|
||||
|
||||
sudo "${DOCKER_BIN}" "\${compose_args[@]}" \\
|
||||
exec -T plane-db \\
|
||||
sh -lc 'pg_restore --list /dev/stdin >/dev/null' \\
|
||||
< "\${BACKUP_DIR}/tasker-postgres.dump"
|
||||
rm -f /tmp/tasker-postgres.dump
|
||||
|
||||
sudo "${DOCKER_BIN}" "\${compose_args[@]}" \\
|
||||
cp "\${BACKUP_DIR}/tasker-postgres.dump" plane-db:/tmp/tasker-postgres.dump
|
||||
|
||||
sudo "${DOCKER_BIN}" "\${compose_args[@]}" \\
|
||||
exec -T plane-db \\
|
||||
pg_restore --list /tmp/tasker-postgres.dump >/dev/null
|
||||
|
||||
sudo "${DOCKER_BIN}" "\${compose_args[@]}" \\
|
||||
exec -T plane-db \\
|
||||
rm -f /tmp/tasker-postgres.dump
|
||||
|
||||
echo "tasker-db-dump-ok: \${BACKUP_DIR}/tasker-postgres.dump"
|
||||
EOF
|
||||
@@ -183,8 +227,24 @@ sudo "${DOCKER_BIN}" compose \\
|
||||
--env-file .env \\
|
||||
-f docker-compose.synology.yml \\
|
||||
exec -T postgres \\
|
||||
sh -lc 'pg_restore --list /dev/stdin >/dev/null' \\
|
||||
< "\${BACKUP_DIR}/ops-agents-postgres.dump"
|
||||
rm -f /tmp/ops-agents-postgres.dump
|
||||
|
||||
sudo "${DOCKER_BIN}" compose \\
|
||||
--env-file .env \\
|
||||
-f docker-compose.synology.yml \\
|
||||
cp "\${BACKUP_DIR}/ops-agents-postgres.dump" postgres:/tmp/ops-agents-postgres.dump
|
||||
|
||||
sudo "${DOCKER_BIN}" compose \\
|
||||
--env-file .env \\
|
||||
-f docker-compose.synology.yml \\
|
||||
exec -T postgres \\
|
||||
pg_restore --list /tmp/ops-agents-postgres.dump >/dev/null
|
||||
|
||||
sudo "${DOCKER_BIN}" compose \\
|
||||
--env-file .env \\
|
||||
-f docker-compose.synology.yml \\
|
||||
exec -T postgres \\
|
||||
rm -f /tmp/ops-agents-postgres.dump
|
||||
|
||||
echo "ops-agents-db-dump-ok: \${BACKUP_DIR}/ops-agents-postgres.dump"
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user