From a4f249ed336539cc1dc77fb1a842b2742069ed25 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Tue, 17 Jun 2025 09:31:04 +0200 Subject: [PATCH 1/2] Update planka --- install/planka-install.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/install/planka-install.sh b/install/planka-install.sh index aa93ef8d..85e2b666 100644 --- a/install/planka-install.sh +++ b/install/planka-install.sh @@ -21,9 +21,36 @@ msg_ok "Installed dependencies" NODE_VERSION="22" setup_nodejs PG_VERSION="16" setup_postgresql + +msg_info "Setting up PostgreSQL Database" +DB_NAME=planka +DB_USER=planka +DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" +{ + echo "PLANKA-Credentials" + echo "PLANKA Database User: $DB_USER" + echo "PLANKA Database Password: $DB_PASS" + echo "PLANKA Database Name: $DB_NAME" +} >>~/planka.creds +msg_ok "Set up PostgreSQL Database" + fetch_and_deploy_gh_release "planka" "plankanban/planka" "prebuild" "latest" "/opt/planka" "planka-prebuild.zip" msg_info "Setup planka" +LOCAL_IP=$(hostname -I | awk '{print $1}') +cd /opt/planka/planka +$STD npm install +cp .env.sample .env +SECRET_KEY=$(openssl rand -hex 64) +sed -i "s#http://localhost:1337#http://${LOCAL_IP}:8080#g" /opt/planka/planka/.env +sed -i "s#postgres@localhost#planka:$DB_PASS@localhost#g" /opt/planka/planka/.env +sed -i "s#notsecretkey#${SECRET_KEY}#g" /opt/planka/planka/.env +$STD npm run db:init msg_ok "Installed planka" msg_info "Creating Service" From d6214cf9da2888a83be063e39a10fefb3c494ff9 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Tue, 17 Jun 2025 09:33:54 +0200 Subject: [PATCH 2/2] Update planka --- ct/planka.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/planka.sh b/ct/planka.sh index ea696051..693e53d8 100644 --- a/ct/planka.sh +++ b/ct/planka.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/refs/heads/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: Slaviša Arežina (tremor021) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE