Pretty much what the title sais.
I made a collection of nix flakes which can be used to develop and deploy Lucee applications purely Functional & declarative.
What this?
lucee-nix allows the exact same environment to be used on “bare-metal” and to be built into a Docker container. The idea here being that developers don’t have to run a docker container for each application they’re working on yet still have all the portability advantages that come with a docker image.
Why did I make this?
OS agnostic
A nix deployment works exactly the same across any operating-systems (Linux, MacOS, BSD (Windows is not a serious operating system but includes one through WSL)).
Simply run nix build or use GitHub - emotions-ch/lucee-manager: a cli to manage a ngnix reverse proxy and dynamic port allocation of multiple lucee instances for development purposes · GitHub :3
Project Isolation
We’ve recently had issues with conflicting JAR dependencies and clnflicting extension versions which lead to my coworker repacking those dependencies to include 2 versions into 1 jar.
Stupid hacks like that wouldn’t be necessary if your entire application can be version pinned & isolated.
reproducibility
Due to the Nature of Nix the Lucee instance and the required extensions have to be decoratively configured which makes “it works on my machine” scenarios impossible and as a developer one can ensure that the application will work as expected once deployed.
but Dockerfile
Dockerfiles SUCK for reproducibility!
Dockerfile allows and in part even encourages non-reproducible and imperative builds. They take your local development deployment and Pack it up.
The Syntax being a cursed offspring of bash doesn’t help.
Furthermore a Nix devshell also has the advantage of being transparent to the developer, meaning the entire Lucee deployment can easily be viewed during local development since it isn’t required to be in a container for a consistent environment.
The bad
- A docker image containing a masa application has a storage footprint of ~1.9GB which is a lot but I am working on getting that size down
- currently no update script to automatically update lucee & extension definitions. I am also working on that :3
(for the lucee devs: Directory listing on https://ext.lucee.org/ like on https://cdn.lucee.org/ would be lovely)
I would love to hear if any of you have thoughts or criticisms <3
and sorry for the spelling, I have dyslexia ![]()