openproject (#3637)

* 'Add new script'

* Update install/openproject-install.sh

Co-authored-by: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com>

* 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 <47820557+MickLesk@users.noreply.github.com>
Co-authored-by: Bas van den Berg <74251551+bvdberg01@users.noreply.github.com>
Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
This commit is contained in:
push-app-to-main[bot] 2025-04-10 14:06:26 +02:00 committed by GitHub
parent 634f3b021f
commit d66b2ee577
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 176 additions and 0 deletions

44
ct/openproject.sh Normal file
View File

@ -0,0 +1,44 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: michelroegl-brunner
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/opf/openproject
APP="OpenProject"
var_tags="${var_tags:-project-management,erp}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
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 /etc/openproject/installer.dat ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating ${APP}"
$STD apt-get update
$STD apt-get install --only-upgrade -y openproject
msg_ok "Updated ${APP}"
exit 0
}
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}/openproject${CL}"

View File

@ -0,0 +1,34 @@
{
"name": "OpenProject",
"slug": "openproject",
"categories": [
25
],
"date_created": "2025-04-03",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 80,
"documentation": "https://www.openproject.org",
"website": "https://www.openproject.org",
"logo": "https://raw.githubusercontent.com/opf/openproject/dev/docker/prod/logo.png",
"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.",
"install_methods": [
{
"type": "default",
"script": "ct/openproject.sh",
"resources": {
"cpu": 2,
"ram": 4096,
"hdd": 8,
"os": "Debian",
"version": "12"
}
}
],
"default_credentials": {
"username": "admin",
"password": "admin"
},
"notes": []
}

View File

@ -0,0 +1,98 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: michelroegl-brunner
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/opf/openproject
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
apt-transport-https \
ca-certificates \
gpg
msg_ok "Installed Dependencies"
msg_info "Setting up OpenProject Repository"
curl -fsSL "https://dl.packager.io/srv/opf/openproject/key" | gpg --dearmor >/etc/apt/trusted.gpg.d/packager-io.gpg
curl -fsSL "https://dl.packager.io/srv/opf/openproject/stable/15/installer/debian/12.repo" -o "/etc/apt/sources.list.d/openproject.list"
msg_ok "Setup OpenProject Repository"
msg_info "Setting up PostgreSQL Repository"
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
echo "deb http://apt.postgresql.org/pub/repos/apt ${VERSION}-pgdg main" >/etc/apt/sources.list.d/pgdg.list
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor --output /etc/apt/trusted.gpg.d/postgresql.gpg
msg_ok "Setup PostgreSQL Repository"
msg_info "Installing PostgreSQL"
$STD apt-get update
$STD apt-get install -y postgresql
msg_ok "Installed PostgreSQL"
msg_info "Setting up PostgreSQL"
DB_NAME=openproject
DB_USER=openproject
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
API_KEY=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | 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 TEMPLATE template0;"
{
echo "OpenProject-Credentials"
echo -e "OpenProject Database User: $DB_USER"
echo -e "OpenProject Database Password: $DB_PASS"
echo -e "OpenProject Database Name: $DB_NAME"
echo -e "OpenProject API Key: $API_KEY"
} >>~/openproject.creds
msg_ok "Set up PostgreSQL"
msg_info "Installing OpenProject"
$STD apt-get install -y openproject
msg_ok "Installed OpenProject"
msg_info "Configuring OpenProject"
IP_ADDR=$(hostname -I | cut -d' ' -f1)
cat <<EOF >/etc/openproject/installer.dat
openproject/edition default
postgres/retry retry
postgres/autoinstall reuse
postgres/db_host 127.0.0.1
postgres/db_port 5432
postgres/db_username ${DB_USER}
postgres/db_password ${DB_PASS}
postgres/db_name ${DB_NAME}
server/autoinstall install
server/variant apache2
server/hostname ${IP_ADDR}
server/server_path_prefix /openproject
server/ssl no
server/variant apache2
server/server_path_prefix
repositories/api-key ${API_KEY}
repositories/svn-install skip
repositories/git-install install
repositories/git-path /var/db/openproject/git
repositories/git-http-backend /usr/lib/git-core/git-http-backend/
memcached/autoinstall install
openproject/admin_email admin@example.net
openproject/default_language en
EOF
$STD sudo openproject configure
msg_ok "Configured OpenProject"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"