• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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
 
You totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic