Patrick
05/18/2022, 1:43 AMbdw429s
05/18/2022, 2:47 AMbdw429s
05/18/2022, 2:48 AMbdw429s
05/18/2022, 2:48 AMbhartsfield
05/18/2022, 10:13 AMPatrick
05/18/2022, 1:04 PMbhartsfield
05/18/2022, 1:25 PMbox install
command runs and the auto-fire package scripts like onServerStart, onServerInstall (and more) give you a way to make that command fire auto-magically when you want it to.bhartsfield
05/18/2022, 1:26 PMPatrick
05/18/2022, 1:27 PMPatrick
05/18/2022, 1:28 PMbhartsfield
05/18/2022, 1:29 PMPatrick
05/18/2022, 1:29 PMbhartsfield
05/18/2022, 1:30 PMbhartsfield
05/18/2022, 1:31 PMPatrick
05/18/2022, 1:32 PMbhartsfield
05/18/2022, 1:32 PMbhartsfield
05/18/2022, 1:33 PM"install:2021":"run-script cfpm:install zip,orm,mysql,postgresql,sqlserver,document,feed,mail,debugger"
bhartsfield
05/18/2022, 1:33 PMPatrick
05/18/2022, 1:34 PMPatrick
05/18/2022, 1:35 PMbhartsfield
05/18/2022, 1:35 PMPatrick
05/18/2022, 1:36 PMbhartsfield
05/18/2022, 1:37 PM"cfpm:install":"echo '\".engine/adobe2021/WEB-INF/cfusion/bin/cfpm.sh\" install ${1}' | run",
"install:2021":"run-script cfpm:install zip,orm,mysql,postgresql,sqlserver,document,feed,mail,debugger"
bhartsfield
05/18/2022, 1:37 PMbdw429s
05/18/2022, 5:25 PMDon't let the name fool you, 'onServerInstall' actually runs on every server start,More specifically, it runs after the point when CommandBox has ensured the server install exists (creating it if necessary). There is an environment variable called
initialInstal
you can use to detect if it's the very first install.
https://commandbox.ortusbooks.com/developing-for-commandbox/interceptors/core-interception-points/server-lifecycle#onserverinstallbdw429s
05/18/2022, 5:26 PMbdw429s
05/18/2022, 5:28 PMbdw429s
05/18/2022, 5:29 PMcfpm
command which automatically defers to the actual script or batch file for you.bdw429s
05/18/2022, 5:31 PMLUCEE_EXTENSIONS
env var so you can just set the env var and it will install, but Adobe CF does NOT do this (outside of the Adobe-specific docker containers)
⢠All ACF has is the cfpm
CLI tool (which ironically, Lucee does NOT have) so there are a lot less options of how you can install your ACF packagesbdw429s
05/18/2022, 5:32 PMonServerInstall
package script
⢠You basically only have the option of running the cfpm CLI tool to install thembdw429s
05/18/2022, 5:33 PMserver.json
(starting in CommandBox 5.5.0, you can have server scripts in your server.json
that work the exact same as package scripts in your box.json
, but only apply to server-related interception points and are obviously specific to that server.)bdw429s
05/18/2022, 5:34 PMserver.json
{
"scripts": {
"onServerInstall": "cfpm install orm,zip,docuemnt,mail,debugger"
}
}
bdw429s
05/18/2022, 5:36 PM{
"scripts" : {
"onServerInstall" : "assertFalse \${interceptData.installDetails.initialInstall} || cfpm install orm,zip,docuemnt,mail,debugger"
}
}
bdw429s
05/18/2022, 5:36 PMPatrick
05/18/2022, 6:07 PMbhartsfield
05/18/2022, 6:09 PMbdw429s
05/18/2022, 6:10 PMbhartsfield
05/18/2022, 6:10 PMjoechastain
05/18/2022, 7:44 PM