From 46e0d4f573abf3b5eb3de374a4582fefc9acbc55 Mon Sep 17 00:00:00 2001 From: sfriedrich Date: Thu, 8 Jan 2026 11:34:56 +0100 Subject: [PATCH 1/9] feat: add forgejo runner --- ct/forgejo-runner.sh | 95 ++++++++++++++++++++ install/forgejo-runner-install.sh | 140 ++++++++++++++++++++++++++++++ 2 files changed, 235 insertions(+) create mode 100644 ct/forgejo-runner.sh create mode 100644 install/forgejo-runner-install.sh diff --git a/ct/forgejo-runner.sh b/ct/forgejo-runner.sh new file mode 100644 index 000000000..c8196a4ea --- /dev/null +++ b/ct/forgejo-runner.sh @@ -0,0 +1,95 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) + +# Copyright (c) 2026 +# Author: Simon Friedrich +# License: MIT +# Source: https://forgejo.org/ + +APP="Forgejo Runner" +var_tags="${var_tags:-ci}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-8}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" + +# REQUIRED for Podman-in-LXC +var_unprivileged="1" +var_nesting="1" +var_keyctl="1" + +# ------------------------------------------------- +# Framework setup +# ------------------------------------------------- +header_info "$APP" +variables +color +catch_errors + +# ------------------------------------------------- +# Description +# ------------------------------------------------- +function description() { + cat </dev/null 2>&1; then + gpg --keyserver hkps://keys.openpgp.org --recv "$GPG_KEY" >/dev/null 2>&1 +fi + +gpg --verify /tmp/forgejo-runner.asc /usr/local/bin/forgejo-runner >/dev/null 2>&1 \ + && msg_ok "Signature valid" \ + || { msg_error "Signature verification failed"; exit 1; } + +# ------------------------------------------------- +# Runner registration +# ------------------------------------------------- +msg_info "Registering Forgejo Runner" + +export DOCKER_HOST="unix:///run/podman/podman.sock" + +forgejo-runner register \ + --instance "$FORGEJO_INSTANCE" \ + --token "$FORGEJO_RUNNER_TOKEN" \ + --name "$HOSTNAME" \ + --labels "linux-${ARCH}:docker://node:20-bookworm" \ + --no-interactive + +msg_ok "Runner registered" + +# ------------------------------------------------- +# systemd service +# ------------------------------------------------- +msg_info "Creating systemd service" + +cat </etc/systemd/system/forgejo-runner.service +[Unit] +Description=Forgejo Runner +Documentation=https://forgejo.org/docs/latest/admin/actions/ +After=podman.socket +Requires=podman.socket + +[Service] +User=root +WorkingDirectory=/root +Environment=DOCKER_HOST=unix:///run/podman/podman.sock +ExecStart=/usr/local/bin/forgejo-runner daemon +Restart=on-failure +RestartSec=10 +TimeoutSec=0 + +[Install] +WantedBy=multi-user.target +EOF + +systemctl daemon-reload +systemctl enable --now forgejo-runner +msg_ok "Forgejo Runner service enabled" + +motd_ssh +customize +cleanup_lxc \ No newline at end of file From b104727293e08f16ce078bc060af993037ab2986 Mon Sep 17 00:00:00 2001 From: lengschder97 Date: Fri, 9 Jan 2026 09:22:12 +0100 Subject: [PATCH 2/9] Fixed comments --- ct/forgejo-runner.sh | 38 +++++--------------------- install/forgejo-runner-install.sh | 44 ++++--------------------------- 2 files changed, 11 insertions(+), 71 deletions(-) diff --git a/ct/forgejo-runner.sh b/ct/forgejo-runner.sh index c8196a4ea..95d002e26 100644 --- a/ct/forgejo-runner.sh +++ b/ct/forgejo-runner.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2026 +# Copyright (c) 2021-2026 community-scripts ORG # Author: Simon Friedrich -# License: MIT +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://forgejo.org/ APP="Forgejo Runner" @@ -14,10 +14,9 @@ var_disk="${var_disk:-8}" var_os="${var_os:-debian}" var_version="${var_version:-12}" -# REQUIRED for Podman-in-LXC -var_unprivileged="1" -var_nesting="1" -var_keyctl="1" +var_unprivileged="${var_unprivileged:-1}" +var_nesting="${var_nesting:-1}" +var_keyctl="${var_keyctl:-1}" # ------------------------------------------------- # Framework setup @@ -27,28 +26,6 @@ variables color catch_errors -# ------------------------------------------------- -# Description -# ------------------------------------------------- -function description() { - cat </dev/null 2>&1; then - gpg --keyserver hkps://keys.openpgp.org --recv "$GPG_KEY" >/dev/null 2>&1 -fi - -gpg --verify /tmp/forgejo-runner.asc /usr/local/bin/forgejo-runner >/dev/null 2>&1 \ - && msg_ok "Signature valid" \ - || { msg_error "Signature verification failed"; exit 1; } - -# ------------------------------------------------- -# Runner registration -# ------------------------------------------------- msg_info "Registering Forgejo Runner" export DOCKER_HOST="unix:///run/podman/podman.sock" @@ -106,9 +76,6 @@ forgejo-runner register \ msg_ok "Runner registered" -# ------------------------------------------------- -# systemd service -# ------------------------------------------------- msg_info "Creating systemd service" cat </etc/systemd/system/forgejo-runner.service @@ -131,8 +98,7 @@ TimeoutSec=0 WantedBy=multi-user.target EOF -systemctl daemon-reload -systemctl enable --now forgejo-runner +systemctl enable -q --now forgejo-runner msg_ok "Forgejo Runner service enabled" motd_ssh From 13747b5768cebbb09d49abf28002e749e65ec92c Mon Sep 17 00:00:00 2001 From: lengschder97 Date: Mon, 12 Jan 2026 12:27:21 +0100 Subject: [PATCH 3/9] Added .json description --- frontend/public/json/forgejo-runner.json | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 frontend/public/json/forgejo-runner.json diff --git a/frontend/public/json/forgejo-runner.json b/frontend/public/json/forgejo-runner.json new file mode 100644 index 000000000..1ffd96d0b --- /dev/null +++ b/frontend/public/json/forgejo-runner.json @@ -0,0 +1,35 @@ +{ + "name": "Forgejo Runner", + "slug": "forgejo-runner", + "categories": [ + 20 + ], + "date_created": "2026-01-12", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": null, + "documentation": "https://forgejo.org/docs/latest/admin/actions/runner-installation/", + "config_path": "/root/.runner", + "website": "https://forgejo.org/docs/latest/admin/actions/runner-installation/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/forgejo.webp", + "description": "Forgejo Runner is a lightweight service that executes CI/CD jobs for Forgejo, enabling automated builds, tests, and deployments.", + "install_methods": [ + { + "type": "default", + "script": "ct/forgejo-runner.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 8, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file From c88fe0a0cd65fcfcfcbbd89bee5a74490c6a8d58 Mon Sep 17 00:00:00 2001 From: lengschder97 Date: Mon, 12 Jan 2026 14:04:10 +0100 Subject: [PATCH 4/9] Fixed greptile comments --- ct/forgejo-runner.sh | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/ct/forgejo-runner.sh b/ct/forgejo-runner.sh index 95d002e26..6c63ee339 100644 --- a/ct/forgejo-runner.sh +++ b/ct/forgejo-runner.sh @@ -18,9 +18,6 @@ var_unprivileged="${var_unprivileged:-1}" var_nesting="${var_nesting:-1}" var_keyctl="${var_keyctl:-1}" -# ------------------------------------------------- -# Framework setup -# ------------------------------------------------- header_info "$APP" variables color @@ -41,20 +38,31 @@ function update_script() { msg_ok "Stopped Forgejo Runner" msg_info "Fetching latest Forgejo Runner version" - RELEASE=$(curl -fsSL https://code.forgejo.org/api/v1/repos/forgejo/runner/releases/latest \ + OS=$(uname -s | tr '[:upper:]' '[:lower:]') + ARCH=$(uname -m) + + case "$ARCH" in + x86_64) ARCH="amd64" ;; + aarch64|arm64) ARCH="arm64" ;; + armv7l) ARCH="armv7" ;; + *) echo "Unsupported architecture: $ARCH" >&2; exit 1 ;; + esac + + RELEASE=$(curl -fsSL https://data.forgejo.org/api/v1/repos/forgejo/runner/releases/latest \ | grep -oP '"tag_name":\s*"\K[^"]+' | sed 's/^v//') msg_info "Updating Forgejo Runner to v${RELEASE}" + curl -fsSL \ - "https://code.forgejo.org/forgejo/runner/releases/download/v${RELEASE}/forgejo-runner-linux-amd64" \ - -o /usr/local/bin/forgejo-runner + "https://data.forgejo.org/forgejo/runner/releases/download/v${RELEASE}/forgejo-runner-${OS}-${ARCH}" \ + -o forgejo-runner + chmod +x /usr/local/bin/forgejo-runner msg_ok "Updated Forgejo Runner" msg_info "Starting Forgejo Runner" - systemctl daemon-reload - systemctl start forgejo-runner + systemctl enable -q --now forgejo-runner msg_ok "Started Forgejo Runner" msg_ok "Update completed successfully!" @@ -65,5 +73,7 @@ start build_container description -msg_ok "Completed successfully!" -echo -e "${INFO}${YW}Forgejo Runner is now online and ready.${CL}" \ No newline at end of file +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}${CL}" \ No newline at end of file From a0cecbc773e94cf397bc5b21b2f5591f10edec67 Mon Sep 17 00:00:00 2001 From: lengschder97 Date: Tue, 13 Jan 2026 07:49:27 +0100 Subject: [PATCH 5/9] Fixed requested changes --- ct/forgejo-runner.sh | 28 +++++++--------------------- install/forgejo-runner-install.sh | 23 +++++------------------ 2 files changed, 12 insertions(+), 39 deletions(-) diff --git a/ct/forgejo-runner.sh b/ct/forgejo-runner.sh index 6c63ee339..9b50ad51b 100644 --- a/ct/forgejo-runner.sh +++ b/ct/forgejo-runner.sh @@ -33,38 +33,24 @@ function update_script() { exit 1 fi - msg_info "Stopping Forgejo Runner" + msg_info "Stopping Services" systemctl stop forgejo-runner - msg_ok "Stopped Forgejo Runner" + msg_ok "Stopped Services" msg_info "Fetching latest Forgejo Runner version" OS=$(uname -s | tr '[:upper:]' '[:lower:]') ARCH=$(uname -m) - case "$ARCH" in - x86_64) ARCH="amd64" ;; - aarch64|arm64) ARCH="arm64" ;; - armv7l) ARCH="armv7" ;; - *) echo "Unsupported architecture: $ARCH" >&2; exit 1 ;; - esac - - RELEASE=$(curl -fsSL https://data.forgejo.org/api/v1/repos/forgejo/runner/releases/latest \ - | grep -oP '"tag_name":\s*"\K[^"]+' | sed 's/^v//') - + RELEASE=$(curl -fsSL https://data.forgejo.org/api/v1/repos/forgejo/runner/releases/latest | grep -oP '"tag_name":\s*"\K[^"]+' | sed 's/^v//') msg_info "Updating Forgejo Runner to v${RELEASE}" - - curl -fsSL \ - "https://data.forgejo.org/forgejo/runner/releases/download/v${RELEASE}/forgejo-runner-${OS}-${ARCH}" \ - -o forgejo-runner - + curl -fsSL "https://data.forgejo.org/forgejo/runner/releases/download/v${RELEASE}/forgejo-runner-${OS}-${ARCH}" -o forgejo-runner chmod +x /usr/local/bin/forgejo-runner msg_ok "Updated Forgejo Runner" - msg_info "Starting Forgejo Runner" - systemctl enable -q --now forgejo-runner - msg_ok "Started Forgejo Runner" - + msg_info "Starting Services" + systemctl start forgejo-runner + msg_ok "Started Services" msg_ok "Update completed successfully!" exit } diff --git a/install/forgejo-runner-install.sh b/install/forgejo-runner-install.sh index 0f55d77f0..be021e489 100644 --- a/install/forgejo-runner-install.sh +++ b/install/forgejo-runner-install.sh @@ -31,17 +31,13 @@ export FORGEJO_RUNNER_TOKEN="$var_forgejo_runner_token" msg_info "Installing dependencies" $STD apt install -y \ - jq git \ + git \ podman podman-docker msg_ok "Dependencies installed" msg_info "Enabling Podman socket" systemctl enable --now podman.socket -msg_ok "Podman socket enabled" - -RAW_ARCH=$(uname -m) -ARCH=$(echo "$RAW_ARCH" | sed 's/x86_64/amd64/;s/aarch64/arm64/') -msg_info "Detected architecture: $ARCH" +msg_ok "Enabled Podman socket" msg_info "Fetching latest Forgejo Runner release" RUNNER_VERSION=$( @@ -49,22 +45,16 @@ RUNNER_VERSION=$( jq -r .name | sed 's/^v//' ) -[[ -z "$RUNNER_VERSION" ]] && { - msg_error "Unable to determine Forgejo Runner version" - exit 1 -} - msg_ok "Forgejo Runner v${RUNNER_VERSION}" FORGEJO_URL="https://code.forgejo.org/forgejo/runner/releases/download/v${RUNNER_VERSION}/forgejo-runner-${RUNNER_VERSION}-linux-${ARCH}" msg_info "Downloading Forgejo Runner" -wget -q -O /usr/local/bin/forgejo-runner "$FORGEJO_URL" +curl -fsSL "$FORGEJO_URL" -o /usr/local/bin/forgejo-runner chmod +x /usr/local/bin/forgejo-runner msg_ok "Runner installed" msg_info "Registering Forgejo Runner" - export DOCKER_HOST="unix:///run/podman/podman.sock" forgejo-runner register \ @@ -73,11 +63,9 @@ forgejo-runner register \ --name "$HOSTNAME" \ --labels "linux-${ARCH}:docker://node:20-bookworm" \ --no-interactive - msg_ok "Runner registered" -msg_info "Creating systemd service" - +msg_info "Creating Services" cat </etc/systemd/system/forgejo-runner.service [Unit] Description=Forgejo Runner @@ -97,9 +85,8 @@ TimeoutSec=0 [Install] WantedBy=multi-user.target EOF - systemctl enable -q --now forgejo-runner -msg_ok "Forgejo Runner service enabled" +msg_ok "Created Services" motd_ssh customize From 572da9a60a99f99ab001d91480f52adb317b948a Mon Sep 17 00:00:00 2001 From: lengschder97 Date: Tue, 13 Jan 2026 08:36:33 +0100 Subject: [PATCH 6/9] Fixed comments --- ct/forgejo-runner.sh | 10 ++-------- install/forgejo-runner-install.sh | 12 +++--------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/ct/forgejo-runner.sh b/ct/forgejo-runner.sh index 9b50ad51b..4542f1bee 100644 --- a/ct/forgejo-runner.sh +++ b/ct/forgejo-runner.sh @@ -38,13 +38,9 @@ function update_script() { msg_ok "Stopped Services" msg_info "Fetching latest Forgejo Runner version" - OS=$(uname -s | tr '[:upper:]' '[:lower:]') - ARCH=$(uname -m) - RELEASE=$(curl -fsSL https://data.forgejo.org/api/v1/repos/forgejo/runner/releases/latest | grep -oP '"tag_name":\s*"\K[^"]+' | sed 's/^v//') msg_info "Updating Forgejo Runner to v${RELEASE}" - curl -fsSL "https://data.forgejo.org/forgejo/runner/releases/download/v${RELEASE}/forgejo-runner-${OS}-${ARCH}" -o forgejo-runner - + curl -fsSL "https://data.forgejo.org/forgejo/runner/releases/download/v${RELEASE}/forgejo-runner-linux-amd64" -o forgejo-runner chmod +x /usr/local/bin/forgejo-runner msg_ok "Updated Forgejo Runner" @@ -60,6 +56,4 @@ 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}${CL}" \ No newline at end of file +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" \ No newline at end of file diff --git a/install/forgejo-runner-install.sh b/install/forgejo-runner-install.sh index be021e489..93b623a3c 100644 --- a/install/forgejo-runner-install.sh +++ b/install/forgejo-runner-install.sh @@ -40,23 +40,17 @@ systemctl enable --now podman.socket msg_ok "Enabled Podman socket" msg_info "Fetching latest Forgejo Runner release" -RUNNER_VERSION=$( - curl -fsSL https://data.forgejo.org/api/v1/repos/forgejo/runner/releases/latest | - jq -r .name | sed 's/^v//' -) - +RUNNER_VERSION=$(curl -fsSL https://data.forgejo.org/api/v1/repos/forgejo/runner/releases/latest | jq -r .name | sed 's/^v//') msg_ok "Forgejo Runner v${RUNNER_VERSION}" +msg_info "Installing Forgejo Runner" FORGEJO_URL="https://code.forgejo.org/forgejo/runner/releases/download/v${RUNNER_VERSION}/forgejo-runner-${RUNNER_VERSION}-linux-${ARCH}" - -msg_info "Downloading Forgejo Runner" curl -fsSL "$FORGEJO_URL" -o /usr/local/bin/forgejo-runner chmod +x /usr/local/bin/forgejo-runner -msg_ok "Runner installed" +msg_ok "Installed Forgejo Runner" msg_info "Registering Forgejo Runner" export DOCKER_HOST="unix:///run/podman/podman.sock" - forgejo-runner register \ --instance "$FORGEJO_INSTANCE" \ --token "$FORGEJO_RUNNER_TOKEN" \ From 2da6c955f35738d0ea74df631d9f23eebdea607f Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Tue, 13 Jan 2026 10:38:06 +0100 Subject: [PATCH 7/9] refactor --- ct/forgejo-runner.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ct/forgejo-runner.sh b/ct/forgejo-runner.sh index 4542f1bee..59145398c 100644 --- a/ct/forgejo-runner.sh +++ b/ct/forgejo-runner.sh @@ -37,7 +37,6 @@ function update_script() { systemctl stop forgejo-runner msg_ok "Stopped Services" - msg_info "Fetching latest Forgejo Runner version" RELEASE=$(curl -fsSL https://data.forgejo.org/api/v1/repos/forgejo/runner/releases/latest | grep -oP '"tag_name":\s*"\K[^"]+' | sed 's/^v//') msg_info "Updating Forgejo Runner to v${RELEASE}" curl -fsSL "https://data.forgejo.org/forgejo/runner/releases/download/v${RELEASE}/forgejo-runner-linux-amd64" -o forgejo-runner @@ -47,7 +46,7 @@ function update_script() { msg_info "Starting Services" systemctl start forgejo-runner msg_ok "Started Services" - msg_ok "Update completed successfully!" + msg_ok "Updated successfully!" exit } @@ -56,4 +55,4 @@ build_container description msg_ok "Completed successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" \ No newline at end of file +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" From bc1b073f74ea51b857f543279ca6ec305322b862 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Tue, 13 Jan 2026 10:40:04 +0100 Subject: [PATCH 8/9] refactor --- install/forgejo-runner-install.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/install/forgejo-runner-install.sh b/install/forgejo-runner-install.sh index 93b623a3c..f6bea2f5f 100644 --- a/install/forgejo-runner-install.sh +++ b/install/forgejo-runner-install.sh @@ -33,19 +33,15 @@ msg_info "Installing dependencies" $STD apt install -y \ git \ podman podman-docker -msg_ok "Dependencies installed" +msg_ok "Installed dependencies" msg_info "Enabling Podman socket" systemctl enable --now podman.socket msg_ok "Enabled Podman socket" -msg_info "Fetching latest Forgejo Runner release" -RUNNER_VERSION=$(curl -fsSL https://data.forgejo.org/api/v1/repos/forgejo/runner/releases/latest | jq -r .name | sed 's/^v//') -msg_ok "Forgejo Runner v${RUNNER_VERSION}" - msg_info "Installing Forgejo Runner" -FORGEJO_URL="https://code.forgejo.org/forgejo/runner/releases/download/v${RUNNER_VERSION}/forgejo-runner-${RUNNER_VERSION}-linux-${ARCH}" -curl -fsSL "$FORGEJO_URL" -o /usr/local/bin/forgejo-runner +RUNNER_VERSION=$(curl -fsSL https://data.forgejo.org/api/v1/repos/forgejo/runner/releases/latest | jq -r .name | sed 's/^v//') +curl -fsSL "https://code.forgejo.org/forgejo/runner/releases/download/v${RUNNER_VERSION}/forgejo-runner-${RUNNER_VERSION}-linux-${ARCH}" -o /usr/local/bin/forgejo-runner chmod +x /usr/local/bin/forgejo-runner msg_ok "Installed Forgejo Runner" @@ -57,7 +53,7 @@ forgejo-runner register \ --name "$HOSTNAME" \ --labels "linux-${ARCH}:docker://node:20-bookworm" \ --no-interactive -msg_ok "Runner registered" +msg_ok "Registered Forgejo Runner" msg_info "Creating Services" cat </etc/systemd/system/forgejo-runner.service @@ -84,4 +80,4 @@ msg_ok "Created Services" motd_ssh customize -cleanup_lxc \ No newline at end of file +cleanup_lxc From 48556b5636d6cebe242360bc240744330aa1181c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 09:46:55 +0000 Subject: [PATCH 9/9] Delete investbrain (ct) after migration to ProxmoxVE (#1276) Co-authored-by: github-actions[bot] --- ct/investbrain.sh | 91 ------------- frontend/public/json/investbrain.json | 40 ------ install/investbrain-install.sh | 182 -------------------------- 3 files changed, 313 deletions(-) delete mode 100644 ct/investbrain.sh delete mode 100644 frontend/public/json/investbrain.json delete mode 100644 install/investbrain-install.sh diff --git a/ct/investbrain.sh b/ct/investbrain.sh deleted file mode 100644 index ea5f3f48c..000000000 --- a/ct/investbrain.sh +++ /dev/null @@ -1,91 +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: Benito Rodríguez (b3ni) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/investbrainapp/investbrain - -APP="Investbrain" -var_tags="${var_tags:-finance;portfolio;investing}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-2048}" -var_disk="${var_disk:-4}" -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 [[ ! -d /opt/investbrain ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - if check_for_gh_release "Investbrain" "investbrainapp/investbrain"; then - PHP_VERSION="8.4" - msg_info "Stopping Services" - systemctl stop nginx php${PHP_VERSION}-fpm - $STD supervisorctl stop all - msg_ok "Services Stopped" - - PHP_FPM=YES PHP_MODULE="gd,zip,intl,pdo,pgsql,pdo-pgsql,bcmath,opcache,mbstring,redis" setup_php - setup_composer - NODE_VERSION="22" setup_nodejs - PG_VERSION="17" setup_postgresql - - msg_info "Creating Backup" - rm -f /opt/.env.backup - rm -rf /opt/investbrain_backup - cp /opt/investbrain/.env /opt/.env.backup - cp -r /opt/investbrain/storage /opt/investbrain_backup - msg_ok "Created Backup" - - fetch_and_deploy_gh_release "Investbrain" "investbrainapp/investbrain" "tarball" "latest" "/opt/investbrain" - - msg_info "Updating Investbrain" - cd /opt/investbrain - rm -rf /opt/investbrain/storage - cp /opt/.env.backup /opt/investbrain/.env - cp -r /opt/investbrain_backup/ /opt/investbrain/storage - export COMPOSER_ALLOW_SUPERUSER=1 - $STD /usr/local/bin/composer install --no-interaction --no-dev --optimize-autoloader - $STD npm install - $STD npm run build - $STD php artisan storage:link - $STD php artisan migrate --force - $STD php artisan cache:clear - $STD php artisan view:clear - $STD php artisan route:clear - $STD php artisan event:clear - $STD php artisan route:cache - $STD php artisan event:cache - chown -R www-data:www-data /opt/investbrain - chmod -R 775 /opt/investbrain/storage /opt/investbrain/bootstrap/cache - rm -rf /opt/.env.backup /opt/investbrain_backup - msg_ok "Updated Investbrain" - - msg_info "Starting Services" - systemctl start php${PHP_VERSION}-fpm nginx - $STD supervisorctl start all - msg_ok "Services Started" - 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 "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}" diff --git a/frontend/public/json/investbrain.json b/frontend/public/json/investbrain.json deleted file mode 100644 index 7ed3fbccc..000000000 --- a/frontend/public/json/investbrain.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "Investbrain", - "slug": "investbrain", - "categories": [ - 23 - ], - "date_created": "2025-12-26", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 8000, - "documentation": "https://github.com/investbrainapp/investbrain", - "website": "https://investbra.in", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/investbrain.webp", - "config_path": "/opt/investbrain/.env", - "description": "Investbrain is a smart open-source investment tracker that helps you manage, track, and make informed decisions about your investments.", - "install_methods": [ - { - "type": "default", - "script": "ct/investbrain.sh", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 4, - "os": "debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "Database credentials: `cat ~/investbrain.creds`", - "type": "info" - } - ] -} diff --git a/install/investbrain-install.sh b/install/investbrain-install.sh deleted file mode 100644 index 375499948..000000000 --- a/install/investbrain-install.sh +++ /dev/null @@ -1,182 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2026 community-scripts ORG -# Author: Benito Rodríguez (b3ni) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/investbrainapp/investbrain - -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 \ - nginx \ - supervisor \ - redis-server \ - libfreetype-dev \ - libjpeg62-turbo-dev \ - libpng-dev \ - zlib1g-dev \ - libzip-dev \ - libicu-dev \ - libpq-dev -msg_ok "Installed Dependencies" - -export PHP_VERSION="8.4" -PHP_FPM=YES PHP_MODULE="gd,zip,intl,pdo,pgsql,pdo-pgsql,bcmath,opcache,mbstring,redis" setup_php -setup_composer -NODE_VERSION="22" setup_nodejs -PG_VERSION="17" setup_postgresql -PG_DB_NAME="investbrain" PG_DB_USER="investbrain" setup_postgresql_db - -fetch_and_deploy_gh_release "Investbrain" "investbrainapp/investbrain" "tarball" "latest" "/opt/investbrain" -import_local_ip - -msg_info "Installing Investbrain (Patience)" -APP_KEY=$(openssl rand -base64 32) -cd /opt/investbrain -cat </opt/investbrain/.env -APP_KEY=base64:${APP_KEY} -APP_PORT=8000 -APP_URL=http://${LOCAL_IP}:8000 -ASSET_URL=http://${LOCAL_IP}:8000 - -LOG_CHANNEL=daily -LOG_LEVEL=warning - -REGISTRATION_ENABLED=true - -AI_CHAT_ENABLED=false -OPENAI_API_KEY= -OPENAI_ORGANIZATION= - -MARKET_DATA_PROVIDER=yahoo -ALPHAVANTAGE_API_KEY= -FINNHUB_API_KEY= -ALPACA_API_KEY= -ALPACA_API_SECRET= -TWELVEDATA_API_SECRET= - -MARKET_DATA_REFRESH=30 -DAILY_CHANGE_TIME= - -DB_CONNECTION=pgsql -DB_HOST=127.0.0.1 -DB_PORT=5432 -DB_DATABASE=${PG_DB_NAME} -DB_USERNAME=${PG_DB_USER} -DB_PASSWORD=${PG_DB_PASS} - -REDIS_CLIENT=phpredis -REDIS_HOST=127.0.0.1 -REDIS_PASSWORD=null -REDIS_PORT=6379 - -CACHE_STORE=redis -CACHE_PREFIX= - -SESSION_DRIVER=redis -SESSION_LIFETIME=120 - -QUEUE_CONNECTION=redis - -MAIL_MAILER=log -MAIL_HOST=127.0.0.1 -MAIL_PORT=2525 -MAIL_FROM_ADDRESS="investbrain@${LOCAL_IP}" - -VITE_APP_NAME=Investbrain -EOF -export COMPOSER_ALLOW_SUPERUSER=1 -$STD /usr/local/bin/composer install --no-interaction --no-dev --optimize-autoloader -$STD npm install -$STD npm run build -mkdir -p /opt/investbrain/storage/{framework/cache,framework/sessions,framework/views,app,logs} -$STD php artisan migrate --force -$STD php artisan storage:link -$STD php artisan cache:clear -$STD php artisan view:clear -$STD php artisan route:clear -$STD php artisan event:clear -$STD php artisan route:cache -$STD php artisan event:cache -chown -R www-data:www-data /opt/investbrain -chmod -R 775 /opt/investbrain/bootstrap/cache -msg_ok "Installed Investbrain" - -msg_info "Configuring Nginx" -cat </etc/nginx/sites-available/investbrain.conf -server { - listen 8000 default_server; - listen [::]:8000 default_server; - server_name _; - - root /opt/investbrain/public; - index index.php; - - client_max_body_size 50M; - charset utf-8; - - location = /favicon.ico { access_log off; log_not_found off; } - location = /robots.txt { access_log off; log_not_found off; } - - location / { - try_files \$uri \$uri/ /index.php?\$query_string; - } - - location ~ \.php\$ { - fastcgi_pass unix:/var/run/php/php${PHP_VERSION}-fpm.sock; - fastcgi_param SCRIPT_FILENAME \$realpath_root\$fastcgi_script_name; - include fastcgi_params; - fastcgi_hide_header X-Powered-By; - fastcgi_read_timeout 300; - } - - location ~ /\.(?!well-known).* { - deny all; - } - - error_log /var/log/nginx/investbrain_error.log; - access_log /var/log/nginx/investbrain_access.log; -} -EOF -ln -sf /etc/nginx/sites-available/investbrain.conf /etc/nginx/sites-enabled/ -rm -f /etc/nginx/sites-enabled/default -$STD systemctl reload nginx -msg_ok "Configured Nginx" - -msg_info "Setting up Supervisor" -cat </etc/supervisor/conf.d/investbrain.conf -[program:investbrain-queue] -process_name=%%(program_name)s_%%(process_num)02d -command=php /opt/investbrain/artisan queue:work --sleep=3 --tries=1 --memory=256 --timeout=3600 -user=www-data -autostart=true -autorestart=true -redirect_stderr=true -stdout_logfile=/opt/investbrain/storage/logs/queue.log -stdout_logfile_maxbytes=50MB -stdout_logfile_backups=10 -numprocs=1 -EOF -$STD supervisorctl reread -$STD supervisorctl update -$STD supervisorctl start all -msg_ok "Setup Supervisor" - -msg_info "Setting up Cron for Scheduler" -cat </etc/cron.d/investbrain-scheduler -* * * * * www-data php /opt/investbrain/artisan schedule:run >> /dev/null 2>&1 -EOF -chmod 644 /etc/cron.d/investbrain-scheduler -$STD systemctl restart cron -msg_ok "Setup Cron for Scheduler" - -motd_ssh -customize -cleanup_lxc