Alessio-

Thank you very much.  This is definitely what I am after.  I just have a couple 
of points that maybe you can clarify for me:


1.        It appears that the properties in geoserver-environment.properties 
can only be applied to configuration in data_dir/workspaces such as 
datastore.xml and coveragestore.xml files, but not other configuration like 
data_dir/logging.xml, data_dir/gwc/geowebcache.xml, or 
data_dir/security/usergroup/default/users.xml – is this correct?

2.       It also looks like according to the comment in the source code for 
GeoServerEnvironment.java that System variables should also work, however 
neither setting them as System Environment variables or setting them in 
JAVA_OPTS seemed to work – only placing the geoserver-environment.properties in 
the data directory worked. 
https://github.com/geoserver/geoserver/blob/0054d601f5283fbde087bb253286e9512185d998/src/platform/src/main/java/org/geoserver/platform/GeoServerEnvironment.java#L153

Ideally I would like to be able to externalize the data directory using the env 
var GEOSERVER_DATA_DIR and also any property contained within config files 
found in the data directory, allowing for the same war file to be deployed 
across environments.

Thanks
-Tim


From: Alessio Fabiani [mailto:[email protected]]
Sent: Monday, March 20, 2017 11:39 AM
To: Keane, Tim <[email protected]>
Cc: [email protected]
Subject: Re: [Geoserver-users] spring PropertyPlaceholderConfigurer for data 
directory files?

Hi Tim,
during the work for the Backup & Restore plugin for GeoServer, we had the 
chance to implement also the possibility for GeoServer of externalize catalog 
parameters into a ".properties" file placed on the GeoServer Data Directory.
Hopefully this may help you.

Some more details and a small example on how to use it can be found here

http://docs.geoserver.org/latest/en/user/community/backuprestore/configtemplate.html

Please, notice that the documentation is a bit misleading. You won't need to 
install also the Backup & Restore plugin, this functionality is already 
available on GeoServer.

Let me know how it goes and if you need further details/help on this.

Cheers,
Alessio Fabiani.


Best Regards,
Alessio Fabiani.

==
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.
==

Ing. Alessio Fabiani
@alfa7691
github<https://github.com/afabiani?tab=overview>
Founder/Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39 331 6233686

http://www.geo-solutions.it<http://www.geo-solutions.it/>
http://twitter.com/geosolutions_it

-------------------------------------------------------


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i 
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo 
è consentito esclusivamente al destinatario del messaggio, per le finalità 
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne 
il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di 
procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro 
sistema. Conservare il messaggio stesso, divulgarlo anche in parte, 
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, 
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.



The information in this message and/or attachments, is intended solely for the 
attention and use of the named addressee(s) and may be confidential or 
proprietary in nature or covered by the provisions of privacy act (Legislative 
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in 
accord with its purpose, any disclosure, reproduction, copying, distribution, 
or either dissemination, either whole or partial, is strictly forbidden except 
previous formal approval of the named addressee(s). If you are not the intended 
recipient, please contact immediately the sender by telephone, fax or e-mail 
and delete the information in this message that has been received in error. The 
sender does not give any warranty or accept liability as the content, accuracy 
or completeness of sent messages and accepts no responsibility  for changes 
made after they were sent or for other risks which arise as a result of e-mail 
transmission, viruses, etc.

---------------------------------------------------------------------

On Mon, Mar 20, 2017 at 3:29 PM, Keane, Tim 
<[email protected]<mailto:[email protected]>> wrote:
Is there a mechanism for using a properties file for value substitution into 
all things xml in the data directory? (i.e., datastore.xml, coveragestore.xml, 
users.xml)

________________________________

This e-mail, including any attachments, may be confidential, privileged or 
otherwise legally protected. It is intended only for the addressee. If you 
received this e-mail in error or from someone who was not authorized to send it 
to you, do not disseminate, copy or otherwise use this e-mail or its 
attachments. Please notify the sender immediately by reply e-mail and delete 
the e-mail from your system.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to