modius
July 11, 2016, 8:15am
#1
There are various points where one can influence the configuration of the underlying Lucee engine:
Lucee Admin GUI (changes saved in the lucee-server.xml
and lucee-web.xml.cfm
config files)
Environment variables and System properties
Application.cfc (Runtime only)
Tag/Function/Other
This Google Sheet is a fairly comprehensive overview of current configuration options and priorities (open to view/comment):
Sheet1
Setting, Type( Compiler| Runtime| Instruction)
The Application. cfc only can hold Runtime
settings, enviroment variables can define
Runtime and Compiler Settings, Admin, EnvVar/ SysProp, Application. cfc, Tag/ Function/ Other
Full null...
Note, darker the red and the more !!!
the more critical the perceived priority
Lucee 5 makes some progress towards enabling configuration by environment, but we still have a ways to go. This is an open thread for general feedback on priorities, and related discussion around progress on configuration in general.
Related topics
We often use the Memcached extension in our Lucee applications, and since it’s not bundled with Lucee core then we need a simple way of installing it as part of a Docker build.
Lucee 5.x supports installing extensions via system properties (and by convention these also work via environment variables, by using an _ in the environment variable name in place of the . in the system variable name) using a comma separated list of extension IDs. This means that we can add a line like this to our Docke…
Lucee 5 allows to configure a few things with help of system properties
https://bitbucket.org/lucee/lucee/wiki/System.properties%20(Work%20in%20progress)
System properties
System properties supported by Lucee:
lucee.base.dir (base directory for the engine)
lucee.server.dir (server context, same as init param lucee-server-directory)
lucee.web.dir (web context, same as init param lucee-web-directory)
lucee.controller.interval (number of milliseconds between controller calls, 0 to disable …
This is an open discussion about the ways in which a Lucee server, or Lucee application should be configured. We’re introducing some cool new things like system property config (http://lang.lucee.org/t/configure-lucee-via-system-properties/91 ) and I’d like to be able visualize all the ways config can be stored and used at run time to make sure our approach is holistic and well thought out.
Currently, I can think of three “logical” places that configuration exists
Server level
Web level
Appli…
1 Like
modius
July 11, 2016, 8:22am
#2
SMTP Configuration
A workaround for configuring SMTP with environment variables:
<cfif structKeyExists(THIS, "bUseEnv") AND THIS.bUseEnv eq "true">
<cfset system = createObject("java", "java.lang.System")>
<!--- // SMTP Server Settings --->
<cfset SMTP_SERVER = "" & system.getEnv("SMTP_SERVER")>
<cfif len(SMTP_SERVER)>
<cfset THIS.tag.mail.server = system.getEnv("SMTP_SERVER")>
<cfset THIS.tag.mail.port = system.getEnv("SMTP_PORT")>
<cfset THIS.tag.mail.username = system.getEnv("SMTP_USERNAME")>
<cfset THIS.tag.mail.password = system.getEnv("SMTP_PASSWORD")>
</cfif>
</cfif>
Note, this probably puts SMTP behind cache management in priorities.
modius
July 17, 2016, 5:32am
#3
Ability to create a Cache Connection from Application.cfc
https://luceeserver.atlassian.net/browse/LDEV-715
For example, configuring a RAM cache:
this.cache.connections["mycache"] = {
type: "ram",
storage: false,
timeToIdle: CreateTimeSpan(0,0,0,0),
timeToLive: CreateTimeSpan(0,0,0,0),
default: "object|template|query|resource|function|include|http|file|webservice"
}
Commit destined for 5.0.1.22 :
https://github.com/lucee/Lucee/commit/fbde329c5d74353e0943e1372a952eff813f2d83
modius
March 18, 2017, 4:42am
#4
In Lucee 5.x you can now configure SMTP settings in the Application.cfc
like so:
this.mails =[
{
host: 'mailgate4.mysite.com'
, port: 25
, username: ''
, password: ''
, ssl: false
, tls: false
, lifeTimespan: createTimeSpan(0,0,1,0)
, idleTimespan: createTimeSpan(0,0,0,10)
}
];
Note, its not documented as yet but you can infer this and other Application.cfc
configuration options by exporting from Lucee Admin.
h/t @mhintze (CFML Slack)
domino
April 19, 2019, 4:42pm
#6
0
I have dockerized site build upon Mura CMS and I need to change Whitespace management of Lucee to not default value.
Docker file: blueriver/docker-muracms:7.1-commandbox-lucee5
So wondering if does exist environment variable to cover that purpose.
@domino This answer is late to the party, but for anyone else who may come across this, so long as you’re using a CommandBox image, the answer is yet
cfconfig_whitespaceManagement=smart
That env var will automatically be picked up by the CFConfig module and applied when your server starts.
Of course, the same setting can also go into a .cfconfig.json
file.