Skip to content

Commit bada204

Browse files
planka (#5277)
* 'Add new script' * Update planka.sh * Update planka.sh * Update planka.json --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: Slaviša Arežina <[email protected]>
1 parent 1c42a20 commit bada204

File tree

4 files changed

+226
-0
lines changed

4 files changed

+226
-0
lines changed

ct/headers/planka

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
__ __
2+
____ / /___ _____ / /______ _
3+
/ __ \/ / __ `/ __ \/ //_/ __ `/
4+
/ /_/ / / /_/ / / / / ,< / /_/ /
5+
/ .___/_/\__,_/_/ /_/_/|_|\__,_/
6+
/_/

ct/planka.sh

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/refs/heads/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/plankanban/planka
7+
8+
APP="PLANKA"
9+
var_tags="${var_tags:-Arr}"
10+
var_cpu="${var_cpu:-1}"
11+
var_ram="${var_ram:-1024}"
12+
var_disk="${var_disk:-4}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-12}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
27+
if [[ ! -f /etc/systemd/system/planka.service ]]; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit
30+
fi
31+
RELEASE=$(curl -s https://api.github.com/repos/plankanban/planka/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
32+
if [[ "${RELEASE}" != "$(cat ~/.planka 2>/dev/null)" ]] || [[ ! -f ~/.planka ]]; then
33+
msg_info "Stopping $APP"
34+
systemctl stop planka
35+
msg_ok "Stopped $APP"
36+
37+
msg_info "Updating $APP to ${RELEASE}"
38+
mkdir -p /opt/planka-backup
39+
mkdir -p /opt/planka-backup/favicons
40+
mkdir -p /opt/planka-backup/user-avatars
41+
mkdir -p /opt/planka-backup/background-images
42+
mkdir -p /opt/planka-backup/attachments
43+
mv /opt/planka/planka/.env /opt/planka-backup
44+
mv /opt/planka/planka/public/favicons/* /opt/planka-backup/favicons/
45+
mv /opt/planka/planka/public/user-avatars/* /opt/planka-backup/user-avatars/
46+
mv /opt/planka/planka/public/background-images/* /opt/planka-backup/background-images/
47+
mv /opt/planka/planka/private/attachments/* /opt/planka-backup/attachments/
48+
rm -rf /opt/planka
49+
fetch_and_deploy_gh_release "planka" "plankanban/planka" "prebuild" "latest" "/opt/planka" "planka-prebuild.zip"
50+
cd /opt/planka/planka
51+
$STD npm install
52+
mv /opt/planka-backup/.env /opt/planka/planka/
53+
mv /opt/planka-backup/favicons/* /opt/planka/planka/public/favicons/
54+
mv /opt/planka-backup/user-avatars/* /opt/planka/planka/public/user-avatars/
55+
mv /opt/planka-backup/background-images/* /opt/planka/planka/public/background-images/
56+
mv /opt/planka-backup/attachments/* /opt/planka/planka/private/attachments/
57+
msg_ok "Updated $APP to ${RELEASE}"
58+
59+
msg_info "Starting $APP"
60+
systemctl start planka
61+
msg_ok "Started $APP"
62+
63+
msg_ok "Update Successful"
64+
else
65+
msg_ok "No update required. ${APP} is already at ${RELEASE}"
66+
fi
67+
exit
68+
}
69+
70+
start
71+
build_container
72+
description
73+
74+
msg_ok "Completed Successfully!\n"
75+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
76+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
77+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:1337${CL}"

frontend/public/json/planka.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "PLANKA",
3+
"slug": "planka",
4+
"categories": [
5+
12
6+
],
7+
"date_created": "2025-06-09",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 1337,
12+
"documentation": "https://docs.planka.cloud/",
13+
"website": "https://planka.app/",
14+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/planka.webp",
15+
"config_path": "/opt/planka/planka/.env",
16+
"description": "Planka is a powerful, project management platform that transforms how teams collaborate. Create projects with multiple boards, organize tasks with intuitive drag-and-drop cards, attach files, write rich markdown descriptions, set due dates, assign team members, and keep conversations flowing with comments and labels—all with seamless real-time updates and smart notifications.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/planka.sh",
21+
"resources": {
22+
"cpu": 1,
23+
"ram": 1024,
24+
"hdd": 4,
25+
"os": "debian",
26+
"version": "12"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": [
35+
{
36+
"text": "Type `cat ~/planka.creds` inside LXC to see admin user and database credentials.",
37+
"type": "info"
38+
}
39+
]
40+
}

install/planka-install.sh

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/plankanban/planka
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing dependencies"
17+
$STD apt-get install -y \
18+
unzip \
19+
build-essential \
20+
python3-venv
21+
msg_ok "Installed dependencies"
22+
23+
NODE_VERSION="22" setup_nodejs
24+
PG_VERSION="16" setup_postgresql
25+
26+
msg_info "Setting up PostgreSQL Database"
27+
DB_NAME=planka
28+
DB_USER=planka
29+
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
30+
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
31+
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
32+
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
33+
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
34+
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
35+
{
36+
echo "PLANKA DB Credentials"
37+
echo "PLANKA Database User: $DB_USER"
38+
echo "PLANKA Database Password: $DB_PASS"
39+
echo "PLANKA Database Name: $DB_NAME"
40+
} >>~/planka.creds
41+
msg_ok "Set up PostgreSQL Database"
42+
43+
fetch_and_deploy_gh_release "planka" "plankanban/planka" "prebuild" "latest" "/opt/planka" "planka-prebuild.zip"
44+
45+
msg_info "Configuring PLANKA"
46+
LOCAL_IP=$(hostname -I | awk '{print $1}')
47+
SECRET_KEY=$(openssl rand -hex 64)
48+
cd /opt/planka/planka
49+
$STD npm install
50+
cp .env.sample .env
51+
sed -i "s#http://localhost:1337#http://$LOCAL_IP:1337#g" /opt/planka/planka/.env
52+
sed -i "s#postgres@localhost#planka:$DB_PASS@localhost#g" /opt/planka/planka/.env
53+
sed -i "s#notsecretkey#$SECRET_KEY#g" /opt/planka/planka/.env
54+
$STD npm run db:init
55+
msg_ok "Configured PLANKA"
56+
57+
msg_info "Creating Admin User"
58+
ADMIN_EMAIL="[email protected]"
59+
ADMIN_PASSWORD="$(openssl rand -base64 12)"
60+
ADMIN_NAME="Administrator"
61+
ADMIN_USERNAME="admin"
62+
echo "" >>.env
63+
echo "# Temporary admin user creation settings" >>.env
64+
echo "DEFAULT_ADMIN_EMAIL=$ADMIN_EMAIL" >>.env
65+
echo "DEFAULT_ADMIN_PASSWORD=$ADMIN_PASSWORD" >>.env
66+
echo "DEFAULT_ADMIN_NAME=$ADMIN_NAME" >>.env
67+
echo "DEFAULT_ADMIN_USERNAME=$ADMIN_USERNAME" >>.env
68+
$STD npm run db:seed
69+
sed -i '/# Temporary admin user creation settings/,$d' .env
70+
{
71+
echo ""
72+
echo "PLANKA Admin Credentials"
73+
echo "Admin Email: $ADMIN_EMAIL"
74+
echo "Admin Password: $ADMIN_PASSWORD"
75+
echo "Admin Name: $ADMIN_NAME"
76+
echo "Admin Username: $ADMIN_USERNAME"
77+
} >>~/planka.creds
78+
msg_ok "Created Admin User"
79+
80+
msg_info "Creating Service"
81+
cat <<EOF >/etc/systemd/system/planka.service
82+
[Unit]
83+
Description=planka Service
84+
After=network.target
85+
86+
[Service]
87+
WorkingDirectory=/opt/planka/planka
88+
ExecStart=/usr/bin/npm start --prod
89+
Restart=always
90+
91+
[Install]
92+
WantedBy=multi-user.target
93+
EOF
94+
systemctl enable -q --now planka
95+
msg_ok "Created Service"
96+
97+
motd_ssh
98+
customize
99+
100+
msg_info "Cleaning up"
101+
$STD apt-get -y autoremove
102+
$STD apt-get -y autoclean
103+
msg_ok "Cleaned"

0 commit comments

Comments
 (0)