Skip to content

Commit d66b2ee

Browse files
push-app-to-main[bot]MickLeskbvdberg01michelroegl-brunner
authored
openproject (#3637)
* 'Add new script' * Update install/openproject-install.sh Co-authored-by: Bas van den Berg <[email protected]> * Update openproject-install.sh * Update openproject-install.sh --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: CanbiZ <[email protected]> Co-authored-by: Bas van den Berg <[email protected]> Co-authored-by: Michel Roegl-Brunner <[email protected]>
1 parent 634f3b0 commit d66b2ee

File tree

3 files changed

+176
-0
lines changed

3 files changed

+176
-0
lines changed

ct/openproject.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/usr/bin/env bash
2+
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: michelroegl-brunner
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/opf/openproject
7+
8+
APP="OpenProject"
9+
var_tags="${var_tags:-project-management,erp}"
10+
var_cpu="${var_cpu:-2}"
11+
var_ram="${var_ram:-4096}"
12+
var_disk="${var_disk:-8}"
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+
if [[ ! -f /etc/openproject/installer.dat ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
msg_info "Updating ${APP}"
31+
$STD apt-get update
32+
$STD apt-get install --only-upgrade -y openproject
33+
msg_ok "Updated ${APP}"
34+
exit 0
35+
}
36+
37+
start
38+
build_container
39+
description
40+
41+
msg_ok "Completed Successfully!\n"
42+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
43+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
44+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}/openproject${CL}"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "OpenProject",
3+
"slug": "openproject",
4+
"categories": [
5+
25
6+
],
7+
"date_created": "2025-04-03",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 80,
12+
"documentation": "https://www.openproject.org",
13+
"website": "https://www.openproject.org",
14+
"logo": "https://raw.githubusercontent.com/opf/openproject/dev/docker/prod/logo.png",
15+
"description": "OpenProject is a web-based project management software. Use OpenProject to manage your projects, tasks and goals. Collaborate via work packages and link them to your pull requests on Github. Read more about the OpenProject GitHub integration.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/openproject.sh",
20+
"resources": {
21+
"cpu": 2,
22+
"ram": 4096,
23+
"hdd": 8,
24+
"os": "Debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": "admin",
31+
"password": "admin"
32+
},
33+
"notes": []
34+
}

install/openproject-install.sh

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: michelroegl-brunner
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/opf/openproject
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+
apt-transport-https \
19+
ca-certificates \
20+
gpg
21+
msg_ok "Installed Dependencies"
22+
23+
msg_info "Setting up OpenProject Repository"
24+
curl -fsSL "https://dl.packager.io/srv/opf/openproject/key" | gpg --dearmor >/etc/apt/trusted.gpg.d/packager-io.gpg
25+
curl -fsSL "https://dl.packager.io/srv/opf/openproject/stable/15/installer/debian/12.repo" -o "/etc/apt/sources.list.d/openproject.list"
26+
msg_ok "Setup OpenProject Repository"
27+
28+
msg_info "Setting up PostgreSQL Repository"
29+
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
30+
echo "deb http://apt.postgresql.org/pub/repos/apt ${VERSION}-pgdg main" >/etc/apt/sources.list.d/pgdg.list
31+
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor --output /etc/apt/trusted.gpg.d/postgresql.gpg
32+
msg_ok "Setup PostgreSQL Repository"
33+
34+
msg_info "Installing PostgreSQL"
35+
$STD apt-get update
36+
$STD apt-get install -y postgresql
37+
msg_ok "Installed PostgreSQL"
38+
39+
msg_info "Setting up PostgreSQL"
40+
DB_NAME=openproject
41+
DB_USER=openproject
42+
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
43+
API_KEY=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
44+
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
45+
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
46+
{
47+
echo "OpenProject-Credentials"
48+
echo -e "OpenProject Database User: $DB_USER"
49+
echo -e "OpenProject Database Password: $DB_PASS"
50+
echo -e "OpenProject Database Name: $DB_NAME"
51+
echo -e "OpenProject API Key: $API_KEY"
52+
} >>~/openproject.creds
53+
msg_ok "Set up PostgreSQL"
54+
55+
msg_info "Installing OpenProject"
56+
$STD apt-get install -y openproject
57+
msg_ok "Installed OpenProject"
58+
59+
msg_info "Configuring OpenProject"
60+
IP_ADDR=$(hostname -I | cut -d' ' -f1)
61+
cat <<EOF >/etc/openproject/installer.dat
62+
openproject/edition default
63+
64+
postgres/retry retry
65+
postgres/autoinstall reuse
66+
postgres/db_host 127.0.0.1
67+
postgres/db_port 5432
68+
postgres/db_username ${DB_USER}
69+
postgres/db_password ${DB_PASS}
70+
postgres/db_name ${DB_NAME}
71+
server/autoinstall install
72+
server/variant apache2
73+
74+
server/hostname ${IP_ADDR}
75+
server/server_path_prefix /openproject
76+
server/ssl no
77+
server/variant apache2
78+
server/server_path_prefix
79+
repositories/api-key ${API_KEY}
80+
repositories/svn-install skip
81+
repositories/git-install install
82+
repositories/git-path /var/db/openproject/git
83+
repositories/git-http-backend /usr/lib/git-core/git-http-backend/
84+
memcached/autoinstall install
85+
openproject/admin_email [email protected]
86+
openproject/default_language en
87+
EOF
88+
89+
$STD sudo openproject configure
90+
msg_ok "Configured OpenProject"
91+
92+
motd_ssh
93+
customize
94+
95+
msg_info "Cleaning up"
96+
$STD apt-get -y autoremove
97+
$STD apt-get -y autoclean
98+
msg_ok "Cleaned"

0 commit comments

Comments
 (0)