Last active
December 27, 2015 18:49
-
-
Save cfalzone/7372106 to your computer and use it in GitHub Desktop.
Initial dotCMS Deploy Script
This file contains hidden or 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
#!/bin/bash | |
# Figure out who our db server is | |
export DB_HOST=`hostname | perl -pe 's/app/db/g'` | |
echo "DB Host is - ${DB_HOST}" | |
export DB_PORT=5444 | |
# DotCMS Paths | |
export DOTCMS_BASE=/data/wwwroot/dotcms | |
export DOTCMS_HOME=$DOTCMS_BASE/current | |
# Clone the osgiplugins repo | |
cd $DOTCMS_BASE | |
git clone [email protected]:/aquent/osgiplugins.git | |
# Deploy the jars and exports | |
cp osgiplugins/jars/*.jar $DOTCMS_HOME/dotCMS/WEB-INF/felix/load/. | |
cat osgiplugins/EXPORTS >> $DOTCMS_HOME/dotCMS/WEB-INF/felix/osgi-extra.conf | |
# Get rid of dotCMS's config plugins and Clone the config plugin | |
cd $DOTCMS_HOME/plugins | |
rm -rf com.dotcms.config | |
git clone [email protected]:/aquent/com.aquent.config.git | |
# Change the Hostname and Port in the ROOT File | |
perl -pi -e "s/\{DB_HOST\}/${DB_HOST}/g" $DOTCMS_HOME/plugins/com.aquent.config/ROOT/tomcat/conf/Catalina/localhost/ROOT.xml | |
perl -pi -e "s/\{DB_PORT\}/${DB_PORT}/g" $DOTCMS_HOME/plugins/com.aquent.config/ROOT/tomcat/conf/Catalina/localhost/ROOT.xml | |
# Deploy and startup | |
cd $DOTCMS_HOME | |
ant clean deploy-no-jsp deploy-plugins | |
bin/startup.sh | |
echo "Tail: tail -100f ${DOTCMS_HOME}/tomcat/logs/dotcms.log" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment