-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add deploy.sh and install.sh in bin/
- unter Abschaffung des Port-Wechsels (9000 <-> 9100) => 9100 fest. - auch Entfernung des conf-Verzeichnisses (dieses muss nun lokal unter /etc/toscience/api.conf o.ä. vorgehalten werden)
- Loading branch information
Showing
34 changed files
with
64 additions
and
169,747 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,6 @@ data | |
.settings | ||
.classpath | ||
.project | ||
bin | ||
conf/application.conf | ||
conf/mail.properties | ||
conf/site.conf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
if (( $EUID == 0 )); then | ||
echo "Don't run as root!" | ||
exit | ||
fi | ||
|
||
export TERM=xterm-color | ||
deployingApp="regal-api" | ||
branch=$(git status | grep branch | cut -d ' ' -f3) | ||
echo "git currently on branch: "$branch | ||
if [ ! -z "$1" ]; then | ||
branch="$1" | ||
fi | ||
|
||
cd /opt/regal/$deployingApp | ||
git pull origin $branch | ||
/opt/regal/activator/bin/activator -java-home /opt/jdk clean | ||
/opt/regal/activator/bin/activator -java-home /opt/jdk clean-files | ||
/opt/regal/activator/bin/activator -java-home /opt/jdk dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
if (( $EUID == 0 )); then | ||
echo "Don't run as root!" | ||
exit | ||
fi | ||
|
||
actDir=$(pwd) | ||
deployingApp="regal-api" | ||
toscienceDir="/opt/regal" | ||
deployDir="/opt/regal/regal-tmp" | ||
targetDir="/opt/regal" | ||
linkDir="regal-server" | ||
fileName="regal-api-0.8.0-SNAPSHOT.zip" | ||
folderName="regal-api-0.8.0-SNAPSHOT" | ||
newInstallDir="$linkDir.$(date +'%Y%m%d%H%M%S')" | ||
confDir="/etc/to.science/api.conf" | ||
resourcesDir="/etc/to.science/resources" | ||
PLAYPORT=9000 | ||
|
||
cp $deployDir/$deployingApp/target/universal/$fileName $deployDir | ||
|
||
cd $deployDir | ||
unzip $fileName | ||
|
||
mv $deployDir/$folderName $targetDir/$newInstallDir | ||
mkdir $targetDir/$newInstallDir/logs | ||
|
||
if [ -L $toscienceDir/$linkDir ]; then | ||
rm $toscienceDir/$linkDir | ||
fi | ||
ln -sf $targetDir/$newInstallDir $toscienceDir/$linkDir | ||
rm -r $targetDir/$newInstallDir/conf | ||
ln -sf $confDir $targetDir/$newInstallDir/conf | ||
ln -sf $resourcesDir $targetDir/$newInstallDir/resources | ||
cd $actDir | ||
|
||
echo "" | ||
echo "Neue Binärversion verfügbar unter $targetDir/$newInstallDir." | ||
echo "Port ist fest eingestellet auf: $PLAYPORT" | ||
echo "Zum Umschalten auf die neue Version:" | ||
echo "sudo service regal-api stop" | ||
echo "sudo service regal-api start" | ||
echo "Das Log unter $targetDir/$newInstallDir/logs/application.log beobachten" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.