TL;DR, I lost my mail queue when running Lucee in docker containers.
When you think about state persistence in Lucee, a couple of obvious things come to mind:
- DB data
- Lucee config files (
That second bullet becomes important especially when you start using docker (or use other short-lived kinds of instances).
You might also realize that session persistence is important depending on your load balancing strategy, etc.
However, there’s another bit of state that I only started thinking about after it bit me:
Lucee also manages “tasks.” I think those consist of the email queue and threads. (Maybe there’s more.)
Lucee keeps that information in the filesystem. In the official docker image, that path is (the confusingly named)
If there are outgoing emails queued up and added to the file system, when a container is recreated, those emails are lost.
- You could just accept the lost email.
- You could create a volume for
However, there may be a problem with that second option: If multiple Lucee containers run on a given node, was Lucee built to handle shared access to the
remote-client directory? If not, doesn’t this corner case prevent multiple containers Lucee from running on a given docker node?
That’s just email, I haven’t really thought through the other “task” features. (I’m not sure I know what they all are.)