Lucee Docker Launcher (Announce)

Hi lovely Lucee peeps!

Been a while in which I shared some of the things I do with lucee, so I thought I would share a simple script I use to launch lucee from whichever folder I am in.

I got tired of doing

docker run --rm --name lucee_launcher -v ${PWD}:/app -p 3000:8080 lucee/lucee:5.4.7.1-SNAPSHOT

or waiting for box to start and then I can start typing. The whole thing breaks my flow.

Anyway, wanted to share it if it helps!

I can now do

cd webroot
lucee

And I have a lucee server running at http://localhost:3000

Cheers!

Keep on Lucee-ing!

16 Likes

Very cool! I keep telling myself that I have to learn Bash one of these days—it looks like chicken-scratch (when compared to newer languages). But, I totally get that you don’t want to have to depend on something like Node to be in the path.

Rock on with your bad self!

3 Likes

Hi Mark, just wanted to show how I use Docker compose for a similar startup process on my development machine.

cd theproject
docker compose -f docker-compose-dev.yml up

The neat thing about this is that docker compose starts multiple container and sets up internal dns so that internally to the container for the services. So “web” can be accessed at “https://web:8543” or “https://pdf:6632”. Lucee admin is ready to go at http://web:8588/lucee/admin/index.cfm

(docker-compose-dev.yml)

services:
  web:
    build: .
    ports:
      - "9580:80"
      - "9588:8888"
      - "9543:443"
      - "95:9001"
    volumes:
      - /private/var/lib/appdev/sites/theproject/logs:/opt/lucee/server/lucee-server/context/logs
  pdf:
    image: "gitlab.internaldomain.com:4567/experimental/puppeteer-pdf"
    ports:
      - "6632:3000"

Hey Mark, thank you for sharing this! Yeah, using docker or commandbox commands are nice, but not nearly as easy as running ./lucee. Cheers, Bill