[
http://jira.magnolia-cms.com/browse/MAGNOLIA-2170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21861#action_21861
]
joshua portway commented on MAGNOLIA-2170:
------------------------------------------
I'm not sure it's necessary to make the app directory completely read-only. I
think it's legitimate that some modules might want to write data to the app
directory on install (eg templates etc.). I also think it's reasonably to use
the app directory for caches etc (my image server module creates a cache
directory inside the app, for instance). I think the problem comes when the app
directory is treated as a persistent data store. Because (as has been
mentioned) the app directory usually gets completely overwritten when an app is
deployed, any files written to the application directory should either be
temporary files or be capable of being re-created on demand.
The only real symptom I see of this problem is that currently the mgnl-files
mechanism does not replace missing files on application startup (I assume that
a missing file is treated as a customisation). So any module that installs
files using the mgnl-files mechanism will break as soon as the application is
redeployed - since the files it expects to be available aren't there any more.
It seems to me that the answer would be for the mgnl-files mechanism to simply
replace any missing files on startup rather than treat them as customisations.
If a developer really wanted to customise an installation by removing a file
then they could set a flag in the config/server/install/mgnl-files nodes to
block the re-installation. That's a bit more hassle than simply deleting a
file, but it does have advantages - it makes the developer's intent explicit
and it also allows them to undo the decision if it was a bad idea.
> Webapp should be markable as read-only
> --------------------------------------
>
> Key: MAGNOLIA-2170
> URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-2170
> Project: Magnolia
> Issue Type: Improvement
> Components: build, core
> Affects Versions: 3.5.8
> Reporter: Dan Greening
> Assignee: Gregory Joseph
> Fix For: 4.1
>
>
> Ideally, it would be possible to make the servlet container read-only,
> storing the repository and template files (and any other writable files)
> outside the app directory. This would allow for "instant upgrades" by just
> dropping in a new WAR file. Today, I think, Magnolia really violates the
> principles of a WAR file, which is that it should be self-contained and not
> writable.
> I attempted to remove all writable/changable files and directories to outside
> the directory, and then marked the app directory read-only to diagnose
> problem areas. In Tomcat, it is possible to configure the
> magnolia.properties file location outside the app directory (and by changing
> that version of magnolia.properties, you can move the repository directory)
> out of the servlet container. However, you cannot relocate template files
> outside the app. In addition, the installation process makes changes to the
> contents of the app directory; kind of annoying.
> Would be used by many, I suspect.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------