Hi Jim, thanks for the feedback.
I am not sure if this is the way to go. There is no standard way of getting the servlet name except from a web http request (which we can't easily get in the startup process). Also, I think its better to have separate Tomcat instances and DHIS2_HOME locations per WAR file. It gives better isolation, lets you start/stop instances independently. DHIS_HOME contains apps, files, logs, resources besides filestore, so all of that must be "namespaced" as well in this case. Having separate Tomcats is quite easy - you just set DHIS2_HOME in tomcat/bin/setenv.sh to point to a dedicated location and that's it ;) On Thu, Nov 12, 2015 at 2:31 PM, Jim Grace <jimgr...@gmail.com> wrote: > Hi Lars, > > I like it. > > While we're at it, could we also add a feature to make it easier to run > multiple DHIS 2 instances on the same machine, each with their own config > file (and hence their own database)? I know there are ways to do this > already, but I wonder if we can make an even simpler one by using a config > file naming convention as follows: > > The startup code would get the servlet name from getServletContext > or getServletName (can this be done during startup?), and look for the > config file <servletName>.conf in the DHIS2_HOME directory. If this file is > not found, look for dhis.conf. > > This would make it easy for an implementer to rename dhis.war to other > names, and deploy the other war file(s) either under the same Tomcat > instance or a different Tomcat instance. Each DHIS 2 instance would then > have its own config file in the same DHIS2_HOME directory. > > Cheers, > Jim > > > On Thu, Nov 12, 2015 at 5:58 AM, Lars Helge Øverland <larshe...@gmail.com> > wrote: > >> >> >> On Thu, Nov 12, 2015 at 2:23 AM, Morten Olav Hansen <morte...@gmail.com> >> wrote: >> >>> What about at least using a standard extension like .properties? >>> >> >> I think .conf is pretty standard within the unix/linux world >> (postgresql.conf, users.conf, hosts.conf, etc) and it indicates that is a >> configuration file, so my preference is .conf. >> >> >> >>> >>> -- >>> Morten >>> >>> On Wed, Nov 11, 2015 at 11:28 PM, Lars Helge Øverland < >>> larshe...@gmail.com> wrote: >>> >>>> I agree that structure is nice. However, the intention is to keep this >>>> as simple as absolutely possibly. I think the average dhis self-taught sys >>>> admin is a bit familiar with good old property files but not so much with >>>> yaml or json, and the risk for people ending up with invalid config is >>>> high. I can foresee a flurry of dev list emails going like this: >>>> >>>> - "the system does not start" >>>> - "if your config file valid yaml?" >>>> - "yaml what?" >>>> - "just read up here http://www.yaml.org/start.html" >>>> - "no i don't need to invoice basketballs" >>>> - "can you post your config file?" >>>> - "yes" >>>> - "no don't include your password, now you must reset it" >>>> - "okay i set it to Pass123 now" >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> Mailing list: https://launchpad.net/~dhis2-devs-core >>>> Post to : dhis2-devs-core@lists.launchpad.net >>>> Unsubscribe : https://launchpad.net/~dhis2-devs-core >>>> More help : https://help.launchpad.net/ListHelp >>>> >>>> >>> >> >> >> -- >> Lars Helge Øverland >> Lead developer, DHIS 2 >> University of Oslo >> Skype: larshelgeoverland >> http://www.dhis2.org <https://www.dhis2.org> >> >> >> -- >> Mailing list: https://launchpad.net/~dhis2-devs-core >> Post to : dhis2-devs-core@lists.launchpad.net >> Unsubscribe : https://launchpad.net/~dhis2-devs-core >> More help : https://help.launchpad.net/ListHelp >> >> > -- Lars Helge Øverland Lead developer, DHIS 2 University of Oslo Skype: larshelgeoverland http://www.dhis2.org <https://www.dhis2.org>
-- Mailing list: https://launchpad.net/~dhis2-devs-core Post to : dhis2-devs-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs-core More help : https://help.launchpad.net/ListHelp