]> source.dussan.org Git - gitblit.git/commitdiff
Allow gitblit baseFolder to be defined by a system property 212/head 41/141/1
authorKoen Serry <koen@serry.org>
Sun, 3 Aug 2014 08:50:14 +0000 (10:50 +0200)
committerKoen Serry <koen@serry.org>
Sun, 3 Aug 2014 08:50:14 +0000 (10:50 +0200)
src/main/java/com/gitblit/servlet/GitblitContext.java

index d5b4092c1131ba27bc57f73ddca31d3ea678e99f..fcc702bbedc137c50c39639abc1a97b5000147e0 100644 (file)
@@ -153,7 +153,7 @@ public class GitblitContext extends DaggerContext {
                        // if the base folder dosen't match the default assume they don't want to use express,
                        // this allows for other containers to customise the basefolder per context.
                        String defaultBase = Constants.contextFolder$ + "/WEB-INF/data";
-                       String base = lookupBaseFolderFromJndi();
+                       String base = System.getProperty("GITBLIT_HOME",lookupBaseFolderFromJndi());
                        if (!StringUtils.isEmpty(System.getenv("OPENSHIFT_DATA_DIR")) && defaultBase.equals(base)) {
                                // RedHat OpenShift
                                baseFolder = configureExpress(context, webxmlSettings, contextFolder, runtimeSettings);