I'm running Lucee 6 (6.0.0.477-SNAPSHOT-light) for...
# lucee
j
I'm running Lucee 6 (6.0.0.477-SNAPSHOT-light) for the first time today. Sanity check: Shouldn't I see
/opt/lucee/web/lucee-web.xml.cfm
mappings reflected in the Lucee admin, and vice versa? In my docker container, I've got a custom
lucee-web.xml.cfm
with some mappings defined. The custom ones are not showing in the admin. Likewise, if I add mappings via the Lucee admin, they're not reflected in
lucee-web.xml.cfm
.
z
why are you running an old snapshot?
lucee only looks for a web.xml if there's a server.xml
j
Please specify which Lucee docker tag I ought to be running, instead.
lucee only looks for a web.xml if there's a server.xml
Does 6 ship without a
server.xml
?
z
6 uses cfcfonfig.json, it will auto migrate old xml files, with the above caveat
@justincarter hasn't got the 6 docker builds working with the new images just yet
👍 1
j
ooh, gotta look into
cfconfig.json
. i was just about to mention how tired i am of hacking the xml config files in my docker containers.
does
cfconfig.json
support begin in lucee 6 (or do any of the 5.x versions support it)?
also, if i plop a lucee 5.x
server.xml
in place, along with my custom
lucee-web.xml.cfm
, will i find a
cfconfig.json
somewhere in the filesystem? (wondering what that auto-migration process looks like.)
z
5.3.9 introduced some import support for cfconfig, there's no export
but like everything else, 5.4.x has better support
a 6 server will read in the .xml files and write out CFconfig.jsons
j
a 6 server will read in the .xml files and write out CFconfig.jsons
so long as i've got a
serverxml
in place?
but like everything else, 5.4.x has better support
i'm on 5.4 in prod as of a couple weeks ago, btw.
🎉 1
yeah it won't look for a web.xml unless there's a server.xml
j
okay, time for me to start playing with this.
z
look at out.log to see what lucee did and where it looked
that's the log where all the startup goes, before the log4j stuff has even started ( aka normal runtime logs)
j
nice freaking work incorporating
cfconfig.json
support, btw.
z
cheers, was quite painful, @micha, @Mark Drew (he/him) and I did a lot of work knockin out all the bugs
🙏 1
6 still has some quirks to nail down, as you can see on the board
j
i grabbed a (stock)
lucee-server.xml
from a 5.4 container and docker
COPY
-ed it to
/opt/lucee/server/lucee-server/context/lucee-server.xml
in my 6 image. i still have my custom
lucee-web.xml
where it's always been. however, i'm still not seeing my custom mappings in the lucee web admin. `out.log`: https://gist.github.com/jamiejackson/d0088116ba7f805ef91475a3e8ab1841 any guess as to what i'm doing wrong?
z
that's fixed before 6.0.0.503-RC
j
Ah, okay.
@zackster, can i plop my cfconfig.json somewhere on the server for lucee to pick it up automatically or do i need to use
configImport()
?
z
Same places as XML files or in the webroot
👍 1
j
not having luck so far. do i also need to remove the stock `lucee-web.xml.cfm`for it to pick up the json?
btw, i'm back in lucee 5.4
with this at /opt/lucee/web/cfconfig.json:
Copy code
{
  "CFMappings": {
    "/hudexchange_deployment_root": {
      "INSPECTTEMPLATE": "",
      "PHYSICAL": "/var/www",
      "PRIMARY": "physical",
      "TOPLEVEL": "true"
    }
  }
}
i get https://gist.github.com/jamiejackson/04cffa47ea1c6a20f54e75e2b467b67e but i can't see the mapping in the lucee web admin
are there any other requirements besides dropping the file in
/opt/lucee/web/cfconfig.json
?
j
I haven't had time to look at and test any of the config stuff for 6.0 yet so consider those Docker builds as pre-release/incomplete. I expect I will need to document how to handle config files and perhaps provide a helper to deal with migrations
Right now the 6.0 builds are just 5.4 builds with a newer Lucee JAR, and no actual 6.0 features/enhancements yet... They will be coming in the next few weeks
j
Okay, thanks. I'm pausing my 6 exploration until I hear news. However, my 5.4 questions about cfconfig.json still stand.
j
At the moment the questions regarding CFConfig.json probably apply equally to 5.4 and 6.0, I need to look into it myself to see what needs to be done. My guess is that legacy XML usage might require the CFConfig.json to be removed from disk. I need some days before I'll have a chance to do the work though.
z
it's on my list to write up some docs about all of this stuff, probably will have time on friday. I have enough battle scars around this whole migration / implementation but the short answer is, 6.0 will import a legacy xml file ( i think it stores a hash of the file so it gets skipped on subsequent starts ) then any CFConfig.json too, from both the context dir and/or the webroot you can see in
lucee-server/context/logs/out.log
for the order and which files it checks for
lucee-web.xml.cfm
will only be looked for and imported if
lucee-server.xml
exists
j
@zackster, thanks for that but my current dilemma is no longer around
lucee-(web|server).xml
. my starting poing now is that i have a simple, custom `cfconfig.json` that I'm trying to get picked up by lucee 5.4. (once i get that working, i'll try a more full-fledged
cfconfig.json
.) i just can't seem to get it to pick it up. there's probably something simple I'm missing. I included the `out.log`output, in case that helps. https://cfml.slack.com/archives/C06TA0A9W/p1689023625302229?thread_ts=1689006483.729039&cid=C06TA0A9W
hmm, maybe case is important and maybe i need to prefix it with a dot. (
.CFConfig.json
). i'll try that. fingers crossed https://github.com/search?q=repo%3Alucee%2FLucee%20cfconfig.json&type=code
nope. still doesn't get picked up. i'm missing some piece of the puzzle. this is where/what my config file is:
Copy code
$ docker exec e28 cat /opt/lucee/web/.CFConfig.json
{
  "CFMappings": {
    "/hudexchange_deployment_root": {
      "INSPECTTEMPLATE": "",
      "PHYSICAL": "/var/www",
      "PRIMARY": "physical",
      "TOPLEVEL": "true"
    }
  }
}
z
j
hmm, it's where
lucee-web.xml.cfm
normally lives but i do see an
/opt/lucee/web/context
directory, too.
trying it...
no luck. i'm going to try the following now:
Copy code
ENV LUCEE_ADDITIONAL_CONFIG_WEB_DIR=/tmp/fakecontext/
RUN mkdir -p /tmp/fakecontext
COPY ./docker_conf_lucee/templates/cfconfig.json /tmp/fakecontext/.CFConfig.json
i'm spinning my wheels at this point. too much trial and error. i'll revisit this someday when
cfconfig.json
-based lucee configuration is documented.
looking forward to it so i can dump my jinja xml template plumbing, etc. thanks for the help.