Hello all. My ACF/Lucee experience is almost all t...
# lucee
c
Hello all. My ACF/Lucee experience is almost all typical OS installation methods. I'm spinning up a new, single site server, and would like it to be containerized for portability. I'm aware there's a CommandBox method out there, but I was hoping that I could just use native Lucee images with ngnix and MySQL on Docker Compose. But this is much harder than anticipated. Am I missing some great tutorial out there that could have saved me hours? Google Search has failed me and I'm not finding anything about Docker or even Lucee 6 in the Lucee docs. Here's my very basic compose file, but I can't even seem to access the admin UI. (I do get a promising 404 Not Found ngnix error when I go directly to the IP in the browser. Almost all the information I have found out there is quite old. Am I still stuck with having to create a custom Lucee image based upon the image defined below? Seems there should be a much more straight forward way with what I thought was quite popular?
Copy code
services:
  lucee-nginx:
    image: lucee/lucee:6.0.3.1-nginx
    environment:
      - LUCEE_ADMIN_PASSWORD=changeme
    volumes:
      - ./www:/var/www # first part is host path, second part is container path
      - ./lucee/logs:/opt/lucee/server/lucee-server/context/logs
    ports:
      - "80:80"   # nginx
      - "443:443" # nginx
    restart: unless-stopped
b
CommandBox and Docker are not mutually excusive. The Ortus images use CommandBox inside of them. I find them to be quite a lot easier to use given the bundled functionality they have like CFConfig, a single JSON file for pretty much all server config, a much more powerful web server out-of-the-box (so you don't need NGinx, etc) and the ability to configure anything and everything with env vars, not just a few things.
I'm not sure if the Lucee images have any nginx rules to block the admin, but there's a good chance it's simply not installe.
c
Thanks @bdw429s. You just gave me a different perspective. It's not the one I had in my head, but so far appears to be the most viable. Thanks as always! I'll give it a shot.
q
@Chris Tierney -- I did a few presentations for the MMCFUG over the years that cover exactly this.

https://youtu.be/fYQ-BBKir7Q?feature=shared▾

❤️ 1
👍🏼 1
My presentation is based on Lucee 5.x, but updating to 6.x is as simple as changing the version in the Docker file. I do encourage folks to use a separate reverse proxy for the app to help simplify load balancing, etc. later on. I tend to use Traefik as the reverse proxy, which makes handling directory auth/blocking a ton easier. Side note -- try with all your might, to not need to put yourself in a situation where you need to access the administrator. Remember that every time you deploy a new version of your app, any changes you would have made in there by hand gets blown away. Try to make settings changes via code or build a config file that you can bake into the image.
b
a separate reverse proxy for the app to help simplify load balancing
We've found (at Ortus) Docker Swarm to be the fastest, simplest, easiest way to get really nice load balancing up and going. I'm not neccessarily saying it's simple in general, but it's much simpler IMO than Kubernetes, and some of NGinx's load balancing features are paid features
That said, the OP is
spinning up a new, single site server,
so if it's really just a single server running a single site, Docker in general is probably over-doing it IMO. I'd slap on CommandBox, the service manager module and be done. It's minimal install, a single config JSON file, matches your local env exactly, and easy to upgrade
Ortus uses Docker Swarm for all our production sites (like forgebox, the ortus blog, coldbox site, and some client sites). We have 4 or 5 Digital Ocean droplets each running swarm which we manage with Portainer (free) and it nicely load balances each of our sites with as many replicas as we need spread out across the cluster. It's automatically load balanced, self-healing, and has zero-downtime deploys from our CI.
c
Awesome guys. Yeah, accessing the admin in this scenario would be more for troubleshooting/looking for configs. I'm a UI guy. But understand it's not permanent in this case. One thing I did notice though is 6, opposed to -5, has a different directory structure as it no longer has web context. Minor thing, but no documentation.
b
We don't run Nginx inside the containers, but we do run a single instance outside of docker just for simplicity, one place to terminate the certs, serve static files, and put up a maint page if docker is down entirely
6 can have a web context, but doesn't by default. You'd have to turn it back on. For a single site though, it doesn't really matter,.
c
ah, I see. yeah I wouldn't turn it on. I only bring it up because of the volumes in the compose config.
q
@Chris Tierney -- that is correct. The default for Lucee 6 is for a single context (Lucee 4 and 5 were multi-context by default). But check out my videos and the related github projects. I have some skeleton projects there that can be useful to launch a new server with a DB, Reverse Proxy and Lucee in a docker compose setup.
@bdw429s -- For single servers to things running in Swarm, I still run my own reverse proxy. Traefik is awesome -- not only can it auto-manage your SSL certs, it can do load balancing (if needed), and more complicated stuff like http-server level auth, oAuth integrations, caching, etc.
a
We run nginx for ingress and then each container has nginx and in our case undertow which is the same as command box uses for what it’s worth I’m quite interested in https://world.hey.com/dhh/kamal-1-0-5304ff9e for personal projects though in pixl8 land we use Kubernetes