Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
84c5887
Add files via upload
GShwartz May 1, 2024
a38ac18
Add files via upload
GShwartz May 1, 2024
667f62f
Add files via upload
GShwartz May 1, 2024
c6a9f6a
Add files via upload
GShwartz May 1, 2024
14b74e9
Update redmine-4.2-offisrc-nginx
GShwartz May 1, 2024
3324c71
Add files via upload
GShwartz May 6, 2024
475d4d9
Add files via upload
GShwartz May 6, 2024
aecd71e
Add files via upload
GShwartz May 6, 2024
16d0dbf
Update and rename apache-latest-offirepo.sh to apache-latest-offirepo
GShwartz May 6, 2024
055825c
Update apache-latest-offirepo
GShwartz May 6, 2024
bd948b9
Delete services/apache-latest-offirepo
GShwartz May 6, 2024
1ff1968
Delete services/ruby-latest-offirepo-dev.sh
GShwartz May 6, 2024
9d214ab
Delete include/installInProgressHttpd-apache.sh
GShwartz May 6, 2024
ae4aa08
Delete tweaks/apache-enable-ssl.sh
GShwartz May 6, 2024
d268e43
Add files via upload
GShwartz May 6, 2024
10a2edc
Add files via upload
GShwartz May 6, 2024
d2ec459
Add files via upload
GShwartz May 6, 2024
df93230
Add files via upload
GShwartz May 6, 2024
45e9416
Add files via upload
GShwartz May 6, 2024
e42cd88
Add files via upload
GShwartz May 6, 2024
4dd277f
Add files via upload
GShwartz May 6, 2024
03c0cda
Add files via upload
GShwartz May 6, 2024
598ad89
Add files via upload
GShwartz May 6, 2024
c86e797
Add files via upload
GShwartz May 6, 2024
5be7700
Add files via upload
GShwartz May 6, 2024
14c1345
Add files via upload
GShwartz May 6, 2024
0332a0f
Add files via upload
GShwartz May 6, 2024
7f3b148
Add files via upload
GShwartz May 6, 2024
d8600e8
Add files via upload
GShwartz May 6, 2024
079fd6f
Add files via upload
GShwartz May 6, 2024
901020a
Add files via upload
GShwartz May 6, 2024
c498192
Add files via upload
GShwartz May 6, 2024
01b1213
Add files via upload
GShwartz May 6, 2024
9eab56c
Add files via upload
GShwartz May 6, 2024
d111de8
Add files via upload
GShwartz May 6, 2024
4153757
Add files via upload
GShwartz May 6, 2024
d125440
Add files via upload
GShwartz May 6, 2024
ab5ac9d
Add files via upload
GShwartz May 6, 2024
59cd1b0
Add files via upload
GShwartz May 6, 2024
9a4a222
Add files via upload
GShwartz May 6, 2024
74fbc56
Add files via upload
GShwartz May 6, 2024
41f6171
Add files via upload
GShwartz May 6, 2024
5a1e52d
Add files via upload
GShwartz May 6, 2024
2c0866d
Add files via upload
GShwartz May 6, 2024
a9fefee
Add files via upload
GShwartz May 6, 2024
4374ff9
Add files via upload
GShwartz May 6, 2024
cf22e87
Add files via upload
GShwartz May 6, 2024
1e81017
Add files via upload
GShwartz May 6, 2024
3d2631a
Update installer-contrib-redmine-5.1.1-offisrc-rails-mysqlserver-8.0.…
GShwartz May 6, 2024
03177db
Rename mysqlserver-8.0-osrepo-withFiglet.conf to mysqlserver-8.0-osre…
GShwartz May 6, 2024
94edf1c
Add files via upload
GShwartz May 6, 2024
3d775c4
Add files via upload
GShwartz May 6, 2024
1751c9e
Add files via upload
GShwartz May 6, 2024
67e07c5
Add files via upload
GShwartz May 6, 2024
878e8d7
Add files via upload
GShwartz May 6, 2024
2590a33
Add files via upload
GShwartz May 6, 2024
9c86c75
Add files via upload
GShwartz May 6, 2024
5740d55
Add files via upload
GShwartz May 6, 2024
3983735
Add files via upload
GShwartz May 6, 2024
f976bcb
Add files via upload
GShwartz May 6, 2024
588dd45
Add files via upload
GShwartz May 6, 2024
3affc01
Add files via upload
GShwartz May 6, 2024
adbc412
Add files via upload
GShwartz May 6, 2024
be42ed2
Add files via upload
GShwartz May 6, 2024
c3289ab
Add files via upload
GShwartz May 6, 2024
32839ad
Add files via upload
GShwartz May 6, 2024
7caf425
Add files via upload
GShwartz May 6, 2024
7075ab5
Add files via upload
GShwartz May 6, 2024
23fe20d
Add files via upload
GShwartz May 6, 2024
3f4d18a
Add files via upload
GShwartz May 7, 2024
f02d011
Add files via upload
GShwartz May 7, 2024
d8facc1
Add files via upload
GShwartz May 7, 2024
0856f91
Add files via upload
GShwartz May 7, 2024
b8e1f5d
Add files via upload
GShwartz May 7, 2024
2dc13b5
Add files via upload
GShwartz May 7, 2024
846699d
Add files via upload
GShwartz May 7, 2024
a49de58
Add files via upload
GShwartz May 7, 2024
ca12e1f
Add files via upload
GShwartz May 7, 2024
d88bb1f
Add files via upload
GShwartz May 7, 2024
3c38617
Add files via upload
GShwartz May 7, 2024
c6d196f
Add files via upload
GShwartz May 7, 2024
e562a17
Add files via upload
GShwartz May 7, 2024
9543ae9
Add files via upload
GShwartz May 7, 2024
f33d11f
Add files via upload
GShwartz May 7, 2024
c0b19a2
Add files via upload
GShwartz May 7, 2024
ceaa5a5
Add files via upload
GShwartz May 7, 2024
da1ef68
Add files via upload
GShwartz May 7, 2024
f396e5b
Add files via upload
GShwartz May 7, 2024
a61d58a
Add files via upload
GShwartz May 7, 2024
cb1164c
Add files via upload
GShwartz May 7, 2024
8e21f56
Add files via upload
GShwartz May 7, 2024
73d40e5
Add files via upload
GShwartz May 7, 2024
a7e7332
Add files via upload
GShwartz May 7, 2024
87d2f61
Add files via upload
GShwartz May 7, 2024
ade2e39
Add files via upload
GShwartz May 7, 2024
22f766b
Add files via upload
GShwartz May 7, 2024
9a9af02
Add files via upload
GShwartz May 7, 2024
d3403f7
Add files via upload
GShwartz May 7, 2024
db27cf5
Add files via upload
GShwartz May 7, 2024
f37d4dd
Add files via upload
GShwartz May 7, 2024
570ca39
Add files via upload
GShwartz May 7, 2024
00c685e
Add files via upload
GShwartz May 7, 2024
b5da91d
Add files via upload
GShwartz May 7, 2024
9a056a6
Add files via upload
GShwartz May 7, 2024
3fd07ba
Add files via upload
GShwartz May 7, 2024
94e06a7
Add files via upload
GShwartz May 7, 2024
5b4f695
Add files via upload
GShwartz May 7, 2024
b211c4e
Add files via upload
GShwartz May 8, 2024
a91df76
Add files via upload
GShwartz May 8, 2024
612b59e
Fixed RM 4.2 & 5 | Added RM 511 | CloudRon | InstallProgress Landing …
gilshwartzomc May 15, 2024
b37229b
Gave permissions to include/updateInstallStatus.sh
gilshwartzomc May 15, 2024
4c84393
Rename installer-contrib-cloudron-latest-offirepo.conf to installer-c…
GShwartz May 15, 2024
0e54468
Removed copy file
gilshwartzomc May 15, 2024
3c332cc
gave permissions to updateInstallStatus
gilshwartzomc May 15, 2024
6d8cc2a
Updated permissions in Redmine 511
gilshwartzomc May 15, 2024
aa1c660
permissions
gilshwartzomc May 15, 2024
cf43f8f
Changed font color
gilshwartzomc May 15, 2024
346c1b6
Changed file permissions in redmine511
gilshwartzomc May 15, 2024
5c7b5d4
Changed location of permissions
gilshwartzomc May 15, 2024
aeb974e
Rename installer-contrib-cloudron-a-latest-offirepo.conf to installer…
GShwartz May 15, 2024
4769fec
Renamed contrib file
gilshwartzomc May 15, 2024
0866352
Merge remote-tracking branch 'refs/remotes/origin/master'
gilshwartzomc May 15, 2024
458ca2d
Filtered out the updatemirror from the process
gilshwartzomc May 15, 2024
4836970
Finilized CloudRon Installation
gilshwartzomc May 16, 2024
f16b12b
Finalizing
GShwartz May 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 113 additions & 14 deletions apps/cloudron-latest-offirepo
Original file line number Diff line number Diff line change
@@ -1,30 +1,129 @@
#!/bin/bash


if [ -f "include/startup.sh" ]; then
. include/startup.sh
elif [ -f "../include/startup.sh" ]; then
. ../include/startup.sh
fi

rootDir=$(rootDir)

updateAndFinalize() {
local rootDir="$1"
local CWM_DOMAIN="$2"

# Target directories and files
local html_target="/home/yellowtent/box/dashboard/dist/setupdns.html"
local js_target_dir="/home/yellowtent/box/dashboard/dist/js"
local js_target="${js_target_dir}/setupdns.js"

# Check every if the directories and files exist
while [[ ! -d "/home/yellowtent/box/dashboard/dist" || ! -d "$js_target_dir" ]]; do
#echo "Waiting for Cloud-Ron's app directory..."
sleep 3
done

# Perform operations once the directories exist
echo "Cloud-Ron Directories found. Performing operations..." | log

# Ensure target files do not exist before copying new ones
rm -rf "$html_target"
rm -rf "$js_target"

# Copy new files from source to target locations
cp "${rootDir}/tweaks/extras/cloudron/setupdns.html" "$html_target"
cp "${rootDir}/tweaks/extras/cloudron/setupdns.js" "$js_target"

# Replace placeholders in HTML and JS files
sed -i "s/CWMDOMAIN/${CWM_DOMAIN}/g" "$html_target"
sed -i "s/CWMDOMAIN/${CWM_DOMAIN}/g" "$js_target"

echo "Setup DNS files have been updated." | log

# Touchups
bash tweaks/motd-description-append
bash tweaks/cwm-description-autoconfig

echo "Adding descriptions" | log
descriptionAppend "CloudRon Web UI: https://${CWM_DOMAIN}"
descriptionAppend "SSL will be configured after the first step."

# Cleanup
echo "Cleaning up..." | log
sleep 5
systemctl stop apache2
apt-get purge apache2 apache2-utils apache2-bin apache2.2-common
rm -rf /etc/apache2
apt-get autoremove -y
apt-get autoclean -y

end_time=$(date +%s)
duration=$((end_time - start_time))
echo "Installation completed in $duration seconds." | log

tagScript success
exit 0
}

# Define variables
rootDir="$(rootDir)"
updateStatus="$rootDir/include/updateInstallStatus.sh"
LOG_PATH="/var/log/cloudron-setup.log"
WEB_PATH="/var/www/html"
HTML_PATH="/var/www/html/index.html"

clear
echo "Downloading and installing CloudRon" | log
curlDownload https://cloudron.io/cloudron-setup
chmod +x cloudron-setup
bash cloudron-setup
sleep 5

rm -rf /home/yellowtent/box/dashboard/dist/setupdns.html
rm -rf /home/yellowtent/box/dashboard/dist/js/setupdns.html
cp $rootDir/tweaks/extras/cloudron/setupdns.html /home/yellowtent/box/dashboard/dist/setupdns.html
cp $rootDir/tweaks/extras/cloudron/setupdns.js /home/yellowtent/box/dashboard/dist/js/setupdns.js
sed -i "s/CWMDOMAIN/${CWM_DOMAIN}/g" /home/yellowtent/box/dashboard/dist/setupdns.html
sed -i "s/CWMDOMAIN/${CWM_DOMAIN}/g" /home/yellowtent/box/dashboard/dist/js/setupdns.js
# Run the Cloudron setup and tee the output to both stdout and the log file
if [ ! -f "$LOG_PATH" ]; then
touch "$LOG_PATH"
fi

# Wait for App dir and replace files
echo "Starting listener for Cloud-Ron app dirs & DNS update..." | log
updateAndFinalize "$rootDir" "${CWM_DOMAIN}" &

echo "Running CloudRon setup..." | log
start_time=$(date +%s)
echo Y | bash cloudron-setup | tee "$LOG_PATH" &

# Define lists to hold log messages
declare -a pre_display_list=()
declare -A seen # associative array to track seen lines

# Start tailing the log file and process lines as they come
while read line; do
# Locate the line to display
if [[ "$line" == *"==> "* ]]; then
if [[ "$line" == *"Pulling docker images"* ]]; then
line="Pulling docker images (Takes some time)..."
else
line="${line#*==> }"
fi

# Clean the line from extras
line=$(echo "$line" | sed -e 's/installer://g' -e 's/start://g' -e 's/"$//' -e 's/ \+.*//')

echo "Adding descriptions" | log
descriptionAppend "CloudRon Web UI: https://${CWM_DOMAIN}"
descriptionAppend "SSL will be configured after the first step."
# Check if the line has been seen already
if [[ -z "${seen[$line]}" ]]; then
seen[$line]=1
pre_display_list+=("$line")

tagScript success
"$updateStatus" "$HTML_PATH" -cp
for stage in "${pre_display_list[@]}"; do
# Remove all trailing dots first
cleaned_stage=$(echo "$stage" | sed 's/\.*$//')

# Append exactly three dots
final_stage="${cleaned_stage}..."

# Update the installation landing page
"$updateStatus" "$HTML_PATH" -ap "${final_stage}"
done
fi
fi
done < <(tail -f "$LOG_PATH")

exit 0
6 changes: 5 additions & 1 deletion apps/redmine-4.2-offisrc-nginx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ EOF

echo "Installing Bundle" | log
cd $appPath
gem install bundler --no-document
gem install nokogiri -v 1.15.6
gem install net-imap -v 0.3.7
gem install rails -v 6.1.7.7
gem install bundler -v 2.4.22

bundle install --without development test postgresql sqlite
bundle exec rake generate_secret_token
RAILS_ENV=production bundle exec rake db:migrate
Expand Down
7 changes: 6 additions & 1 deletion apps/redmine-5.0-offisrc-nginx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ EOF

echo "Installing Bundle" | log
cd $appPath
gem install bundler --no-document
# Components have been updated with time, for the bundler to work, these specific versions are required.
gem install nokogiri -v 1.15.6
gem install net-imap -v 0.3.7
gem install rails -v 6.1.7.7
gem install bundler -v 2.4.22

bundle install --without development test postgresql sqlite
bundle exec rake generate_secret_token
RAILS_ENV=production bundle exec rake db:migrate
Expand Down
142 changes: 142 additions & 0 deletions apps/redmine-5.1.1-offisrc-apache-rails-mysql-8.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
#!/bin/bash

# Add this at the begining of all scripts.
if [ -f "include/startup.sh" ]; then
. include/startup.sh
elif [ -f "../include/startup.sh" ]; then
. ../include/startup.sh
fi

replaceAdPass() {
changePassScript="$REPO_DIR/change_admin_password.rb"
echo "Writing password change script to $changePassScript..."
touch $changePassScript
cat <<_EOF_ > $changePassScript
#!/usr/bin/env ruby

require_relative 'config/environment'
admin_user = User.where(admin: true).first

if admin_user.nil?
puts "Admin user not found!"
exit 1

else
admin_user.password = ENV['NEW_ADMIN_PASSWORD']
admin_user.password_confirmation = ENV['NEW_ADMIN_PASSWORD']
admin_user.must_change_passwd = false

if admin_user.save
puts "Password updated successfully."

else
puts "Failed to update password: #{admin_user.errors.full_messages.join(", ")}"
exit 1
end
end
_EOF_

# Replace default admin password
echo "Replacing default admin password..."
RAILS_ENV=production NEW_ADMIN_PASSWORD='${ADMINPASSWORD}' rails runner $changePassScript

echo "Removing $changePassScript..."
rm -f $changePassScript

}

# Variables
DB_REDMINE_PASS="redmine"
REPO_URL="https://www.redmine.org/releases/redmine-5.1.1.tar.gz"
REPO_DIR="/opt/redmine"
WEBAPP_CONF="/etc/apache2/sites-available"

# Update system and install required packages
apt-get update && apt-get upgrade -y
apt-get install -y libmysqlclient-dev apt-transport-https

# Secure MySQL and set up Redmine database
mysql --user=root <<_EOF_
DELETE FROM mysql.user WHERE User='';
CREATE DATABASE redmine CHARACTER SET utf8mb4;
CREATE USER 'redmine'@'localhost' IDENTIFIED BY '${DB_REDMINE_PASS}';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';
FLUSH PRIVILEGES;
_EOF_

# Install Redmine
mkdir -p ${REPO_DIR}
curl -s ${REPO_URL} | sudo tar xz -C ${REPO_DIR} --strip-components=1

# Configuring permissions
echo "Configuring permissions..."
chown -R www-data:www-data /opt/redmine/

cd ${REPO_DIR}
# Configure database connection
cat <<_EOF_ > ${REPO_DIR}/config/database.yml
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: "${DB_REDMINE_PASS}"
encoding: utf8mb4
_EOF_

# Install gems
gem install bundler
bundle config set --local without 'development test'
bundle install

# Prepare the database
bundle exec rake generate_secret_token
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production REDMINE_LANG=en bundle exec rake redmine:load_default_data

# Install ImageMagic for Redmine
echo "Installing ImageMagic & ghostscript..."
apt update
apt install -y imagemagick libmagickwand-dev
convert -version
apt install -y ghostscript

#replaceAdPass
echo "Writing apache configuration file..."
cat <<_EOF_ > $WEBAPP_CONF/redmine.conf
<VirtualHost *:80>
ServerName _
DocumentRoot ${REPO_DIR}/public
<Directory ${REPO_DIR}/public>
Allow from all
Options -MultiViews
Require all granted
</Directory>
</VirtualHost>

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName _
DocumentRoot ${REPO_DIR}/public

SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key

<Directory ${REPO_DIR}/public>
Allow from all
Options -MultiViews
Require all granted
</Directory>
</VirtualHost>
</IfModule>
_EOF_


# Enable Redmine site, disable default site
echo "Enabling redmine site & disabling defaults..."
a2ensite redmine
a2dissite installProgress
systemctl reload apache2

echo "Redmine installation is complete."
Binary file added include/Logos/CloudRon_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added include/Logos/Redmine_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added include/Logos/Redmine_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added include/OMC_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading