Move Sigmah application files to /srv

This commit is contained in:
Disassembler 2017-12-08 08:12:15 +01:00
parent 8c4698fdff
commit cda2d83779
3 changed files with 5 additions and 4 deletions

View File

@ -7,7 +7,7 @@ apt-get -y --no-install-recommends install python-bcrypt
# Download Sigmah
wget https://github.com/sigmah-dev/sigmah/releases/download/v2.0.2/sigmah-2.0.2.war -O /tmp/sigmah.war
unzip /tmp/sigmah.war -d /var/lib/tomcat8/webapps/sigmah
unzip /tmp/sigmah.war -d /srv/sigmah
rm -f /tmp/sigmah.war
# Create database
@ -19,9 +19,10 @@ rm -f /tmp/sigmah-createdb.sql
# Configure Sigmah
mkdir -p /srv/sigmah/{files,archives}
chown -R tomcat8:tomcat8 /srv/sigmah
envsubst <${SOURCE_DIR}/var/lib/tomcat8/webapps/sigmah/WEB-INF/classes/META-INF/persistence.xml >/var/lib/tomcat8/webapps/sigmah/WEB-INF/classes/META-INF/persistence.xml
cp ${SOURCE_DIR}/var/lib/tomcat8/webapps/sigmah/WEB-INF/classes/sigmah.properties /var/lib/tomcat8/webapps/sigmah/WEB-INF/classes/sigmah.properties
cp /var/lib/tomcat8/webapps/sigmah/sigmah/images/header/org-default-logo.png /srv/sigmah/files/logo.png
ln -s /srv/sigmah /var/lib/tomcat8/webapps/sigmah
envsubst <${SOURCE_DIR}/srv/sigmah/WEB-INF/classes/META-INF/persistence.xml >/srv/sigmah/WEB-INF/classes/META-INF/persistence.xml
cp ${SOURCE_DIR}/srv/sigmah/WEB-INF/classes/sigmah.properties /srv/sigmah/WEB-INF/classes/sigmah.properties
cp /srv/sigmah/sigmah/images/header/org-default-logo.png /srv/sigmah/files/logo.png
# Populate database
wget https://github.com/sigmah-dev/sigmah/releases/download/v2.0.2/sigmah-MinimumDataKit-2.0.postgresql.sql -O /tmp/sigmah-MinimumDataKit.sql