Lucee on Docker - Setting Defaults

535 views
Skip to first unread message

Greg Moser

unread,
Aug 25, 2015, 6:37:41 PM8/25/15
to Lucee
I am using the base lucee/lucee-tomcat image from docker to spin up instances on google cloud.  As part of my Dockerfile I would like to set the following 3 things:

1) Lucee Server Password
2) Lucee (default context) Web Password
3) Lucee Web Timezone

Where are the easiest places to set these things?
Can they be set on the filesystem?
Or Can I add code to my application.cfc to set these things?

Thanks,
Greg

Justin Carter

unread,
Aug 25, 2015, 7:23:21 PM8/25/15
to Lucee
All three of those things can be set in the config files, so essentially you can do it the same way to the lucee-tomcat Dockerfile configures itself. Have a copy of the lucee-server.xml and lucee-web.xml.cfm files sitting next to your Dockerfile, and then in your Dockerfile you will add a couple of commands to copy the files in to the container when it is built:

COPY lucee-server.xml /opt/lucee/server/lucee-server/context/lucee-server.xml
COPY lucee-web.xml.cfm /opt/lucee/web/lucee-web.xml.cfm

An easy way to configure those files is to just use the Lucee admin. Run your container and log in to the Admin and configure everything you need (including passwords). After that is done you can copy those files out of the container on to your host using "docker cp":


If you need to make more changes in the future you can do the same thing again -- configure it in the Lucee admin, then copy the files out of the container and put them with your Dockerfile.

cheers,
Justin

Pete Freitag

unread,
Aug 25, 2015, 10:23:38 PM8/25/15
to lu...@googlegroups.com
On Tue, Aug 25, 2015 at 6:37 PM, Greg Moser <gr...@gregmoser.com> wrote:
3) Lucee Web Timezone

The timezone can be set in your Application.cfc, eg: this.timezone = "UTC";

--
Pete Freitag
https://foundeo.com/ - ColdFusion Consulting & Products
http://hackmycf.com - CFML Server Security Scanner

Geoff Bowers

unread,
Aug 25, 2015, 11:09:53 PM8/25/15
to Lucee
On Wednesday, 26 August 2015 09:23:21 UTC+10, Justin Carter wrote:
All three of those things can be set in the config files, so essentially you can do it the same way to the lucee-tomcat Dockerfile configures itself. Have a copy of the lucee-server.xml and lucee-web.xml.cfm files sitting next to your Dockerfile, and then in your Dockerfile you will add a couple of commands to copy the files in to the container when it is built:

COPY lucee-server.xml /opt/lucee/server/lucee-server/context/lucee-server.xml
COPY lucee-web.xml.cfm /opt/lucee/web/lucee-web.xml.cfm

Just following on from Justin's advice...

An example of a working development environment using Docker and passing in configs via COPY available here:

Daemon use projects structured like this to set up a working dev environment and a deployment pipeline for Docker apps.

Hopefully with Lucee 5 we will have more options with respect to server configuration via ENV variables.

-- geoff
twitter. @modius

Greg Moser

unread,
Aug 25, 2015, 11:28:09 PM8/25/15
to lu...@googlegroups.com

Thanks guys, I got everything working. 

Docker is awesome.

If you haven't seen googles container engine on google cloud I highly recommend checking it out.  I like it better than elastic beanstalk and the google servers are now cheaper than AWS for the most part.  They way they've done the clustering is awesome and unbelievable scalable.

I now run docker-compose on local dev, and gcloud deployment with kubernetes  and it works awesome.  They're got super easy to use command line tools that make deployment so seemless its incredible.  You can even mout volumes that are active gitRepo's (not doing this for production but its nice for shared test enviornments).

Hopefully Lucee will continue to provide great docker support.

--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/57pPw-L02kA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/9a7ead99-9302-47a1-9dad-ed58a4399c1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Geoff Bowers

unread,
Aug 25, 2015, 11:40:12 PM8/25/15
to Lucee
On Wednesday, 26 August 2015 13:28:09 UTC+10, Greg Moser wrote:

Docker is awesome.


+1
 

If you haven't seen googles container engine on google cloud I highly recommend checking it out.  I like it better than elastic beanstalk and the google servers are now cheaper than AWS for the most part.  They way they've done the clustering is awesome and unbelievable scalable.


We use Tutum.co for miscellaneous apps (it runs Docker on AWS, DigitalOcean, Softlayer, and others), and Mesos/Marathon for larger wholly managed node clusters (10+ servers).  Am very interested to see Google getting their act together in this area.
 

Hopefully Lucee will continue to provide great docker support.


We plan to do great things :)  If you have any feature requests and/or suggestions please raise them here:

All the best,

Greg Moser

unread,
Aug 26, 2015, 9:18:18 AM8/26/15
to Lucee
I hadn't looked into Tutum before, it looks pretty cool and also very similar to Kubernetes as far as deployment and cluster scheduling, but a little bit more cloud agnostic.  Thanks for sending this over, I just created an account and look forward to digging in a bit deeper.
Reply all
Reply to author
Forward
0 new messages