Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit 10a41ce

Browse files
pull upstream changes (#46)
Co-authored-by: bketelsen <37492+bketelsen@users.noreply.github.com>
1 parent 5d2eae2 commit 10a41ce

6 files changed

Lines changed: 480 additions & 19 deletions

File tree

ct/headers/openproject

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/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}"

install/2fauth-install.sh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ update_os
1616
msg_info "Installing Dependencies"
1717

1818
$STD apt-get install -y \
19-
lsb-release \
20-
gpg
19+
lsb-release \
20+
gpg
2121

2222
curl -fsSL https://packages.sury.org/php/apt.gpg | gpg --dearmor -o /usr/share/keyrings/deb.sury.org-php.gpg
23-
echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
23+
echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" >/etc/apt/sources.list.d/php.list
2424
$STD apt-get update
2525

2626
$STD apt-get install -y \
27-
nginx \
28-
composer \
29-
php8.3-{bcmath,common,ctype,curl,fileinfo,fpm,gd,mbstring,mysql,xml,cli} \
30-
mariadb-server
27+
nginx \
28+
composer \
29+
php8.3-{bcmath,common,ctype,curl,fileinfo,fpm,gd,intl,mbstring,mysql,xml,cli} \
30+
mariadb-server
3131
msg_ok "Installed Dependencies"
3232

3333
msg_info "Setting up Database"
@@ -38,10 +38,10 @@ $STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
3838
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
3939
$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
4040
{
41-
echo "2FAuth Credentials"
42-
echo "Database User: $DB_USER"
43-
echo "Database Password: $DB_PASS"
44-
echo "Database Name: $DB_NAME"
41+
echo "2FAuth Credentials"
42+
echo "Database User: $DB_USER"
43+
echo "Database Password: $DB_PASS"
44+
echo "Database Name: $DB_NAME"
4545
} >>~/2FAuth.creds
4646
msg_ok "Set up Database"
4747

@@ -56,12 +56,12 @@ cp .env.example .env
5656
IPADDRESS=$(hostname -I | awk '{print $1}')
5757

5858
sed -i -e "s|^APP_URL=.*|APP_URL=http://$IPADDRESS|" \
59-
-e "s|^DB_CONNECTION=$|DB_CONNECTION=mysql|" \
60-
-e "s|^DB_DATABASE=$|DB_DATABASE=$DB_NAME|" \
61-
-e "s|^DB_HOST=$|DB_HOST=127.0.0.1|" \
62-
-e "s|^DB_PORT=$|DB_PORT=3306|" \
63-
-e "s|^DB_USERNAME=$|DB_USERNAME=$DB_USER|" \
64-
-e "s|^DB_PASSWORD=$|DB_PASSWORD=$DB_PASS|" .env
59+
-e "s|^DB_CONNECTION=$|DB_CONNECTION=mysql|" \
60+
-e "s|^DB_DATABASE=$|DB_DATABASE=$DB_NAME|" \
61+
-e "s|^DB_HOST=$|DB_HOST=127.0.0.1|" \
62+
-e "s|^DB_PORT=$|DB_PORT=3306|" \
63+
-e "s|^DB_USERNAME=$|DB_USERNAME=$DB_USER|" \
64+
-e "s|^DB_PASSWORD=$|DB_PASSWORD=$DB_PASS|" .env
6565

6666
export COMPOSER_ALLOW_SUPERUSER=1
6767
$STD composer update --no-plugins --no-scripts

install/komodo-install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ case $DB_CHOICE in
6161
esac
6262
mkdir -p /opt/komodo
6363
cd /opt/komodo
64-
curl -fsSL "https://raw.githubusercontent.com/mbecker20/komodo/main/compose/$DB_COMPOSE_FILE" -o $(basename "https://raw.githubusercontent.com/mbecker20/komodo/main/compose/$DB_COMPOSE_FILE")
64+
curl -fsSL "https://raw.githubusercontent.com/moghtech/komodo/main/compose/$DB_COMPOSE_FILE" -o $(basename "https://raw.githubusercontent.com/moghtech/komodo/main/compose/$DB_COMPOSE_FILE")
6565

6666
msg_info "Setup Komodo Environment"
67-
curl -fsSL "https://raw.githubusercontent.com/mbecker20/komodo/main/compose/compose.env" -o "/opt/komodo/compose.env"
67+
curl -fsSL "https://raw.githubusercontent.com/moghtech/komodo/main/compose/compose.env" -o "/opt/komodo/compose.env"
6868
DB_PASSWORD=$(openssl rand -base64 16 | tr -d '/+=')
6969
PASSKEY=$(openssl rand -base64 24 | tr -d '/+=')
7070
WEBHOOK_SECRET=$(openssl rand -base64 24 | tr -d '/+=')

install/openproject-install.sh

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
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 admin@example.net
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"
99+
100+
# Modified by surgeon https://github.com/bketelsen/surgeon

0 commit comments

Comments
 (0)