Thanks Charlie, yes have been using the CF docs on containers
I have been using the .car method of importing the connection string successfully using a DevOps secure file, however, this method involves manual generation of the .car, then adding it as a DevOps secure pipeline file which diverges from our project methodology
I'm working on adding the connection string with a cfsetup which seems the best approach, but having an issue appending the alias cfusion in the add datasource command, which works fine when run from cfsetup, but fails when run within the .bat:
./cfsetup.sh add datasource name=mysql1 driver=MySQL5 host=dbhostname port=3306 database=Test_dbo username=user1 password=1234 cfusion
Where cfusion is the alias, registered: cfusion /opt/coldfusion/cfusion
I've tried selecting the alias: ./cfsetup.sh select cfusion
But this fails with the same error, though the error lists cfusion as a valid alias:
./addDataSource.bat
ERR: Provide a valid ColdFusion home.
ExitStatus: FAIL
) found. Register the alias first.
Valid alias list: cfusion
ExitStatus: FAIL
ERR: Provide a valid alias that is registered with CFSetup or ColdFusion home.
ExitStatus: FAIL
: not found
Matt, are you doing this to ADD the datasource during container startup? If so, then as Scott Stroz of the CFhour Podcast would have said several years ago, "you're doing it wrong". 🙂
I'd said (and the docs show) that there's an environment variable where you name the json file in which you have EXPORTED the settings (from some cf implementation) using cfsetup.
As for the cfsetup and alias issue, perhaps that's because WHEN and WHERE you're running it, that folder may not yet exist (like if doing it as commands in a dockerfile, or naming this bat as the startup script for the container).
Can you please try using cfsetup on some working cf2021 instance, and export the setting/s you want from that, and then name THAT file for the container's importcfsettings environment variable?