From 8523f24aefc41efea107691e0cf679be69f43922 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 13:22:03 +0000 Subject: [PATCH] Delete anchor (ct) after migration to ProxmoxVE (#1727) Co-authored-by: github-actions[bot] --- ct/anchor.sh | 83 ------------------------------- install/anchor-install.sh | 100 -------------------------------------- json/anchor.json | 44 ----------------- 3 files changed, 227 deletions(-) delete mode 100644 ct/anchor.sh delete mode 100644 install/anchor-install.sh delete mode 100644 json/anchor.json diff --git a/ct/anchor.sh b/ct/anchor.sh deleted file mode 100644 index f678faae..00000000 --- a/ct/anchor.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2026 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://github.com/ZhFahim/anchor - -APP="Anchor" -var_tags="${var_tags:-notes;productivity;sync}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-2048}" -var_disk="${var_disk:-10}" -var_os="${var_os:-debian}" -var_version="${var_version:-13}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - - if [[ ! -f ~/.anchor ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - if check_for_gh_release "anchor" "ZhFahim/anchor"; then - msg_info "Stopping Services" - systemctl stop anchor-web anchor-server - msg_ok "Stopped Services" - - msg_info "Backing up Configuration" - cp /opt/anchor/.env /opt/anchor.env.bak - msg_ok "Backed up Configuration" - - CLEAN_INSTALL=1 fetch_and_deploy_gh_release "anchor" "ZhFahim/anchor" "tarball" - - msg_info "Building Server" - cd /opt/anchor/server - $STD pnpm install --frozen-lockfile - $STD pnpm prisma generate - $STD pnpm build - [[ -d src/generated ]] && mkdir -p dist/src && cp -R src/generated dist/src/ - msg_ok "Built Server" - - msg_info "Building Web Interface" - cd /opt/anchor/web - $STD pnpm install --frozen-lockfile - SERVER_URL=http://127.0.0.1:3001 $STD pnpm build - cp -r .next/static .next/standalone/.next/static - cp -r public .next/standalone/public - msg_ok "Built Web Interface" - - cp /opt/anchor.env.bak /opt/anchor/.env - rm -f /opt/anchor.env.bak - - msg_info "Running Database Migrations" - cd /opt/anchor/server - set -a && source /opt/anchor/.env && set +a - $STD pnpm prisma migrate deploy - msg_ok "Ran Database Migrations" - - msg_info "Starting Services" - systemctl start anchor-server anchor-web - msg_ok "Started Services" - msg_ok "Updated ${APP}" - 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 "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/install/anchor-install.sh b/install/anchor-install.sh deleted file mode 100644 index d4f7d845..00000000 --- a/install/anchor-install.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2026 community-scripts ORG -# Author: MickLesk (CanbiZ) -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://github.com/ZhFahim/anchor - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs - -PG_VERSION="17" setup_postgresql -PG_DB_NAME="anchor" PG_DB_USER="anchor" setup_postgresql_db - -fetch_and_deploy_gh_release "anchor" "ZhFahim/anchor" "tarball" - -msg_info "Building Server" -cd /opt/anchor/server -$STD pnpm install --frozen-lockfile -$STD pnpm prisma generate -$STD pnpm build -[[ -d src/generated ]] && mkdir -p dist/src && cp -R src/generated dist/src/ -msg_ok "Built Server" - -msg_info "Building Web Interface" -cd /opt/anchor/web -$STD pnpm install --frozen-lockfile -SERVER_URL=http://127.0.0.1:3001 $STD pnpm build -cp -r .next/static .next/standalone/.next/static -cp -r public .next/standalone/public -msg_ok "Built Web Interface" - -msg_info "Configuring Application" -JWT_SECRET=$(openssl rand -base64 32) -cat </opt/anchor/.env -APP_URL=http://${LOCAL_IP}:3000 -JWT_SECRET=${JWT_SECRET} -DATABASE_URL=postgresql://anchor:${PG_DB_PASS}@localhost:5432/anchor -PG_HOST=localhost -PG_USER=anchor -PG_PASSWORD=${PG_DB_PASS} -PG_DATABASE=anchor -PG_PORT=5432 -EOF -msg_ok "Configured Application" - -msg_info "Running Database Migrations" -cd /opt/anchor/server -set -a && source /opt/anchor/.env && set +a -$STD pnpm prisma migrate deploy -msg_ok "Ran Database Migrations" - -msg_info "Creating Services" -cat </etc/systemd/system/anchor-server.service -[Unit] -Description=Anchor API Server -After=network.target postgresql.service - -[Service] -Type=simple -User=root -WorkingDirectory=/opt/anchor/server -EnvironmentFile=/opt/anchor/.env -ExecStart=/usr/bin/node dist/src/main.js -Restart=on-failure -RestartSec=5 - -[Install] -WantedBy=multi-user.target -EOF -cat </etc/systemd/system/anchor-web.service -[Unit] -Description=Anchor Web Interface -After=network.target anchor-server.service - -[Service] -Type=simple -User=root -WorkingDirectory=/opt/anchor/web/.next/standalone -EnvironmentFile=/opt/anchor/.env -Environment=PORT=3000 HOSTNAME=0.0.0.0 NODE_ENV=production -ExecStart=/usr/bin/node server.js -Restart=on-failure -RestartSec=5 - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now anchor-server anchor-web -msg_ok "Created Services" - -motd_ssh -customize -cleanup_lxc diff --git a/json/anchor.json b/json/anchor.json deleted file mode 100644 index 4bc5e7d8..00000000 --- a/json/anchor.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "Anchor", - "slug": "anchor", - "categories": [ - 12 - ], - "date_created": "2026-04-02", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 3000, - "documentation": "https://github.com/ZhFahim/anchor#readme", - "website": "https://github.com/ZhFahim/anchor", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/anchor.webp", - "description": "Anchor is an offline-first, self-hosted note-taking application with rich text editing, real-time sync across devices, note sharing, tags, attachments, OIDC authentication, and admin panel.", - "install_methods": [ - { - "type": "default", - "script": "ct/anchor.sh", - "config_path": "/opt/anchor/.env", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 10, - "os": "Debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "The first user to register becomes the admin.", - "type": "info" - }, - { - "text": "OIDC can be configured via environment variables in `/opt/anchor/.env` or the admin panel.", - "type": "info" - } - ] -}