[MAGNOLIA-3909] Add a magnolia.basedir configurable property to easily change the base folder location for repositories, cache and logs Created: 09/Dec/11  Updated: 22/Feb/12  Resolved: 22/Feb/12

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: 4.5

Type: Improvement Priority: Major
Reporter: Fabrizio Giustina Assignee: Jan Haderka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
duplicate
duplicates MAGNOLIA-3840 Introduce a magnolia.home property to... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

All the folders in the default magnolia.properties file are now relative to the magnolia.app.rootdir property:

magnolia.cache.startdir=${magnolia.app.rootdir}/cache
magnolia.upload.tmpdir=${magnolia.app.rootdir}/tmp
magnolia.exchange.history=${magnolia.app.rootdir}/history
magnolia.repositories.home=${magnolia.app.rootdir}/repositories
magnolia.logs.dir=${magnolia.app.rootdir}/logs

If we want to change the base location where those dirs are written, we have to change any single property listed above, since there is no way to manually set magnolia.app.rootdir to a different value (that would break any webapp-relative path).

Introducing a single configurable magnolia.basedir property which delegates by default to magnolia.app.rootdir makes things easier:

magnolia.basedir=${magnolia.app.rootdir}
magnolia.cache.startdir=${magnolia.basedir}/cache
magnolia.upload.tmpdir=${magnolia.basedir}/tmp
magnolia.exchange.history=${magnolia.basedir}/history
magnolia.repositories.home=${magnolia.basedir}/repositories
magnolia.logs.dir=${magnolia.basedir}/logs

with this, moving all the folders outside the webapp will require a single configuration, e.g.:

magnolia.basedir=/tmp/mytest


 Comments   
Comment by Fabrizio Giustina [ 09/Dec/11 ]

done for 4.5

Comment by Magnolia International [ 14/Dec/11 ]

Fabrizio - would appreciate if you could do a little search for similar/related issues when reporting yours. In this case, MAGNOLIA-3840 is 100% identical, and a little search/comment there would have opened a discussion about the property's name before committing it.

Team - when reviewing, consider the following:

  • redundant with MAGNOLIA-3840 - so see the status and comments on that issue as well.
  • discuss the property name. Imho, magnolia.home is a better choice for these properties: they're meant for use to store files which can be outside the webapp. The "home" for your instance's data. Whereas basedir could still be used a simpler/better name for app.rootdir, or "install dir".
Comment by Jan Haderka [ 22/Feb/12 ]

Since there was no response to comments and questions raised by Gregory, I have to concur to his reasoning. magnolia.home seems better name then magnolia.basedir which would be indeed better suitable for other purposes.

Generated at Mon Feb 12 03:50:51 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.