← Back to team overview

dhis2-devs team mailing list archive

Re: dhis lite

 

2009/3/30 Lars Helge Øverland <larshelge@xxxxxxxxx>:
>
>>
>>
>> > The relative one will have the OS user home as basis.
>>
>> This I don't know.  Unless the URL has a '~' then might it not be
>> relative to the current working directory instead?  This I can check.
>> I think the location of the db is important enough - to enable backups
>> etc - that we want to be very sure where it is actually created.
>
> Hm sorry you are right, I overlooked the ~ in my connection url. It's
> relative to the current working directory, which is actually more useful for
> us.
>
>>
>> If it is to be a directory fixed by either DHIS2_HOME or the CWD
>> (which would be nicer) then I will suggest a layout like:
>>
>> <base_dir> -- dhis2-lite.jar
>>                 -- database
>>                       |
>>                       --- database files
>>                 -- webapp
>>                       |
>>                       --- dhis.war
>>                 -- log
>>                       |
>>                       --- log files
>>
>> Of course we can keep battling to get the war into the jar in the
>> right place, but it is maybe of dubious value.
>
> Looks sensible.
>
> So what you say is that we set the connection url to something like
> jdbc:h2:/database/dhis2,

Or maybe jdbc:h2:./database/dhis2 (see the little dot - to make the
url relative).  I think I'd still use a hibernate.properties file,
probably alongside the jar, to allow some flexibility.  Still have to
puzzle how best to deal with the DHIS2_HOME env variable.  I don't
think Java has a native setEnv() or getCwd() which would have been
useful.

>keep the hardcoded "webapp" folder in WebAppServer
slightly different as webapp would now point to directory resource
outside of the jar, but yes, still some hardcoded default.

Alternatively (maybe this is better) have a dhis2config.xml file
inline with the jar ...

> since we can control the folder name, and zip everything into an archive.
> Then the installation process would simply be to unzip the archive and click
> the exe jar?
>

Pretty much.  Unless we want to make shortcuts or program menu items.



Follow ups

References