diff options
author | James Moger <james.moger@gitblit.com> | 2014-03-20 12:26:43 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-03-20 12:26:43 -0400 |
commit | b5d532aa0840eff2f32158210969bc677a7988dd (patch) | |
tree | d41f2b4badc61a733013546956587f3382c92f7d /src/site/setup_war.mkd | |
parent | 5754cd190b5c61db4d733aa9e179abf09befa3f4 (diff) | |
download | gitblit-b5d532aa0840eff2f32158210969bc677a7988dd.tar.gz gitblit-b5d532aa0840eff2f32158210969bc677a7988dd.zip |
Documentation
Diffstat (limited to 'src/site/setup_war.mkd')
-rw-r--r-- | src/site/setup_war.mkd | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/site/setup_war.mkd b/src/site/setup_war.mkd index 3d28ee67..94309b11 100644 --- a/src/site/setup_war.mkd +++ b/src/site/setup_war.mkd @@ -12,9 +12,19 @@ Open `WEB-INF/data/gitblit.properties` in your favorite text editor and make sur **NOTE:** Make sure to change the administrator username and/or password!!
### WAR Data Location
-By default, Gitblit WAR stores all data (users, settings, repositories, etc) in `${contextFolder}/WEB-INF/data`. This is fine for a quick setup, but there are many reasons why you don't want to keep your data within the webapps folder of your servlet container. You may specify an external location for your data by editing `WEB-INF/web.xml` and manipulating the *baseFolder* context parameter. Choose a location that is writeable by your servlet container. Your servlet container may be smart enough to recognize the change and to restart Gitblit.
+By default, Gitblit WAR stores all data (users, settings, repositories, etc) in `${contextFolder}/WEB-INF/data`. This is fine for a quick setup, but there are many reasons why you don't want to keep your data within the webapps folder of your servlet container. Specifying an alternate *baseFolder* also allows for simple upgrades in the future.
-On the next restart of Gitblit, Gitblit will copy the contents of the `WEB-INF/data` folder to your specified *baseFolder* **IF** the file `${baseFolder}/gitblit.properties` does not already exist. This allows you to get going with minimal fuss.
+Choose a location that is writeable by your servlet container!
-Specifying an alternate *baseFolder* also allows for simpler upgrades in the future.
+After you configure baseFolder and restart your container, Gitblit will copy the contents of the `WEB-INF/data` folder to your specified *baseFolder* **IF** the file `${baseFolder}/gitblit.properties` does not already exist. This allows you to get going with minimal fuss.
+#### Specifying baseFolder through web.xml
+
+You may specify an external location for your data by directly editing `WEB-INF/web.xml` and manipulating the *baseFolder* env-entry. Your servlet container may be smart enough to recognize the change and to restart Gitblit.
+
+#### Specifying baseFolder through JNDI
+
+This is a better way to configure your *baseFolder* because it survives WAR redeploys or deployments of new versions. These directions assume you are running Tomcat as your container, other containers may have different ways to specify global JNDI environment entries.
+
+1. Open TOMCAT_HOME/conf/context.xml
+2. Insert an *Environment* node within the *Context* node.<pre><Environment name="baseFolder" type="java.lang.String" value="c:/projects/git/gitblit/data" override="false" /></pre>
|