Lucee Configuration Options

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):

Note, darker the red and the more !!! the more critical the perceived priority :slight_smile:

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

https://lucee.daemonite.io/t/installing-specific-versions-of-extensions-in-lucee-5-2-x/2333

https://lucee.daemonite.io/t/configure-lucee-via-system-properties/91

https://lucee.daemonite.io/t/how-do-we-make-configuring-lucee-rock/193

1 Like

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.

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:

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)

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 :slight_smile:

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.