Compare commits

...

2 Commits

Author SHA1 Message Date
community-scripts-pr-app[bot]
336b234951 Update CHANGELOG.md (#17660)
Some checks are pending
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
Set state to is_deleted in pocketbase / delete-pocketbase-entry (push) Waiting to run
Sync ct/install to Incus / dispatch (push) Waiting to run
Update script timestamp on .sh changes / update-script-timestamp (push) Waiting to run
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-03 14:58:45 +00:00
push-app-to-main[bot]
01906fe930 Add keeper (ct) (#17659)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
2026-10-03 16:58:20 +02:00
3 changed files with 221 additions and 0 deletions

View File

@@ -551,6 +551,10 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
## 2026-10-03
### 🆕 New Scripts
- Keeper.sh ([#17659](https://github.com/community-scripts/ProxmoxVE/pull/17659))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes

73
ct/keeper.sh Normal file
View File

@@ -0,0 +1,73 @@
#!/usr/bin/env bash
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/ridafkih/keeper.sh
APP="Keeper"
var_tags="${var_tags:-calendar;sync}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/keeper ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "keeper" "ridafkih/keeper.sh"; then
msg_info "Stopping Keeper"
systemctl stop keeper-web keeper-worker keeper-cron keeper-api
msg_ok "Stopped Keeper"
msg_info "Updating Bun"
$STD bun upgrade
msg_ok "Updated Bun"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "keeper" "ridafkih/keeper.sh" "tarball"
msg_info "Building Keeper"
cd /opt/keeper
$STD bun install --frozen-lockfile
$STD bun run --cwd services/api build
$STD bun run --cwd services/cron build
$STD bun run --cwd services/worker build
$STD bun run --cwd applications/web build
msg_ok "Built Keeper"
msg_info "Migrating Keeper Database"
$STD bun --env-file=/opt/keeper_data/.env packages/database/scripts/migrate.ts
msg_ok "Migrated Keeper Database"
msg_info "Starting Keeper"
systemctl start keeper-api keeper-cron keeper-worker keeper-web
msg_ok "Started Keeper"
msg_ok "Updated successfully!"
fi
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
echo -e "${GATEWAY}${BGN}http://${IP}:3000${CL}"

144
install/keeper-install.sh Normal file
View File

@@ -0,0 +1,144 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/ridafkih/keeper.sh
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
redis-server \
unzip
msg_ok "Installed Dependencies"
PG_VERSION="17" setup_postgresql
PG_DB_NAME="keeper" PG_DB_USER="keeper" setup_postgresql_db
msg_info "Installing Bun"
export BUN_INSTALL="/root/.bun"
curl -fsSL https://bun.sh/install | $STD bash
ln -sf /root/.bun/bin/bun /usr/local/bin/bun
ln -sf /root/.bun/bin/bunx /usr/local/bin/bunx
msg_ok "Installed Bun"
fetch_and_deploy_gh_release "keeper" "ridafkih/keeper.sh" "tarball"
msg_info "Building Keeper"
cd /opt/keeper
$STD bun install --frozen-lockfile
$STD bun run --cwd services/api build
$STD bun run --cwd services/cron build
$STD bun run --cwd services/worker build
$STD bun run --cwd applications/web build
msg_ok "Built Keeper"
msg_info "Configuring Keeper"
mkdir -p /opt/keeper_data
cat <<EOF >/opt/keeper_data/.env
ENV=production
DATABASE_URL=postgresql://keeper:${PG_DB_PASS}@127.0.0.1:5432/keeper
REDIS_URL=redis://127.0.0.1:6379
BETTER_AUTH_URL=http://${LOCAL_IP}:3000
BETTER_AUTH_SECRET=$(openssl rand -base64 32)
ENCRYPTION_KEY=$(openssl rand -base64 32)
TRUSTED_ORIGINS=http://${LOCAL_IP}:3000
API_PORT=3001
PORT=3000
VITE_API_URL=http://127.0.0.1:3001
COMMERCIAL_MODE=false
WORKER_JOB_QUEUE_ENABLED=true
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
MICROSOFT_CLIENT_ID=
MICROSOFT_CLIENT_SECRET=
EOF
chmod 600 /opt/keeper_data/.env
msg_ok "Configured Keeper"
msg_info "Migrating Keeper Database"
$STD bun --env-file=/opt/keeper_data/.env packages/database/scripts/migrate.ts
msg_ok "Migrated Keeper Database"
msg_info "Creating Services"
cat <<EOF >/etc/systemd/system/keeper-api.service
[Unit]
Description=Keeper API
After=network.target postgresql.service redis-server.service
[Service]
Type=simple
User=root
WorkingDirectory=/opt/keeper
EnvironmentFile=/opt/keeper_data/.env
ExecStart=/usr/local/bin/bun /opt/keeper/services/api/dist/index.js
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/keeper-cron.service
[Unit]
Description=Keeper Cron
After=network.target postgresql.service redis-server.service
[Service]
Type=simple
User=root
WorkingDirectory=/opt/keeper
EnvironmentFile=/opt/keeper_data/.env
ExecStart=/usr/local/bin/bun /opt/keeper/services/cron/dist/index.js
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/keeper-worker.service
[Unit]
Description=Keeper Worker
After=network.target postgresql.service redis-server.service
[Service]
Type=simple
User=root
WorkingDirectory=/opt/keeper
EnvironmentFile=/opt/keeper_data/.env
ExecStart=/usr/local/bin/bun /opt/keeper/services/worker/dist/index.js
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/keeper-web.service
[Unit]
Description=Keeper Web
After=network.target keeper-api.service
[Service]
Type=simple
User=root
WorkingDirectory=/opt/keeper/applications/web
EnvironmentFile=/opt/keeper_data/.env
ExecStart=/usr/local/bin/bun /opt/keeper/applications/web/dist/server-entry/index.js
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now keeper-api keeper-cron keeper-worker keeper-web
msg_ok "Created Services"
motd_ssh
customize
cleanup_lxc