• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Environment variables and JForum configuration

 
Ranch Hand
Posts: 41
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way environment variables can be used to modify JForum properties files? I've tried several variations, found this Stackoverflow post,

http://stackoverflow.com/questions/2263929/regarding-application-properties-file-and-environment-variable

but got no return from properties equipped with expanded environment variables bar 'null'.

This would be useful, as it is near impossible to match my local against the deployed config.
 
robert crowther
Ranch Hand
Posts: 41
10
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My conclusion:

Environment variables do not seem to work within property files. However JForum cleanly abstracts it's configuration into a handful of files. If parallel installations of the application are not wanted, duplicate the config files, one for each stage, e.g. development, testing, deployment. In most circumstances,

SystemGlobals.properties

and the appropriate db config,

config > database > {mydatabase} > {mydatabase}.properties

are the only two which will need duplicating.
 
robert crowther
Ranch Hand
Posts: 41
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is much information on this in a later post - if setup configuration is of interest, please see here,
https://coderanch.com/t/627867/jforum/Setting-custom-configuration-variables-JForum
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic