← Back to team overview

dhis2-devs-core team mailing list archive

Re: dhis.conf

 

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 <larshelge@xxxxxxxxx>
wrote:

>
>
> On Thu, Nov 12, 2015 at 2:23 AM, Morten Olav Hansen <mortenoh@xxxxxxxxx>
> 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 <
>> larshelge@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx
>>> 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@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs-core
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References