ryan
01/23/2023, 1:45 PMc:\users\ryan\
directory, which seems to suggest this.
Is there any way to configure commandbox to utilize .env files tied to its own running web instance and not available/shared to all other running web instances?
https://www.forgebox.io/view/commandbox-dotenvthisOldDave
01/23/2023, 3:12 PMthisOldDave
01/23/2023, 3:18 PMserver set dotenvFile=foo.properties
and see where it writes it you can also dotenv load
in a task runnerrichard.herbert
01/23/2023, 4:27 PMbdw429s
01/23/2023, 7:53 PMbdw429s
01/23/2023, 7:54 PMbdw429s
01/23/2023, 7:56 PMbdw429s
01/23/2023, 7:57 PMApplication.cfc
, they are going to share the same collection of env vars and system props.ryan
01/23/2023, 8:00 PMryan
01/23/2023, 8:00 PMbdw429s
01/23/2023, 8:00 PMIf you have 5 instances of Lucee, they’s all share the same environment variables, however they were created?@richard.herbert This depends on where you set them. All env vars in an operating system are "OS Level", BUT every executing process on the kernel has its own set of env vars which are a copy of whatever the parent env vars were when the process spawned. So take Linux for example • PID 1 - system.d owned by root. env vars set in this process apply to the entire server • your users shell process started when you logged in -- env vars set here (probably from your profile shell script) are visible to all process your user starts • server 1 - env vars here are specific to server 1 (but still include the previous bullets) • server 2 - env vars here are specific to server 2 (but still include the previous bullets) • and so on
bdw429s
01/23/2023, 8:01 PMbdw429s
01/23/2023, 8:04 PMenv debug
to visualize this. Or
echo `env debug`
if yo want to see a command nested inside of a command 🙂bdw429s
01/23/2023, 8:05 PMryan
01/23/2023, 8:10 PMbdw429s
01/23/2023, 8:13 PMI did notice that my .env and .env.example files are created inThe existence of those files doesn't suggest anything in relation to how many env files you can have for a server.directory, which seems to suggest this.c:\users\ryan\
ryan
01/23/2023, 8:13 PMbdw429s
01/23/2023, 8:14 PMbdw429s
01/23/2023, 8:15 PMbox
which defaulted to having a current working dir of your user home
• ran the coldbox create app
command, not realizing you were dumping a ColdBox app template into your user home
But that's just a guessbdw429s
01/23/2023, 8:15 PMbdw429s
01/23/2023, 8:15 PM.box.env
ryan
01/23/2023, 8:18 PMbdw429s
01/23/2023, 8:34 PMbdw429s
01/23/2023, 8:34 PMbdw429s
01/23/2023, 8:34 PM.env
out of the web root set in the `server.json`'s web.webroot
property. So if that's not working, then we can troubleshoot it.bdw429s
01/23/2023, 8:35 PMryan
01/23/2023, 8:36 PMstart <project_name>
. Each website represents a different client.ryan
01/23/2023, 8:37 PMbdw429s
01/23/2023, 8:37 PMbox.exe
file on your hard drive, but running start xxx
twice starts TWO CommandBox instance/JVM instances/servers.ryan
01/23/2023, 8:37 PMryan
01/23/2023, 8:37 PMbdw429s
01/23/2023, 8:37 PMryan
01/23/2023, 8:37 PMbdw429s
01/23/2023, 8:38 PMbdw429s
01/23/2023, 8:38 PMbdw429s
01/23/2023, 8:38 PMbdw429s
01/23/2023, 8:38 PMbdw429s
01/23/2023, 8:39 PMC:/webroot/site1/
C:/webroot/site2/
C:/webroot/site3/
If each of those folders contains their own .env
file and you run server start
in each folder separately, then they are totally separate things, each with their own env varsbdw429s
01/23/2023, 8:40 PMbdw429s
01/23/2023, 8:41 PMryan
01/23/2023, 8:41 PMbdw429s
01/23/2023, 8:41 PMbdw429s
01/23/2023, 8:42 PM~/.env
file is being used at all. Probably just created there on accident.bdw429s
01/23/2023, 8:42 PMryan
01/23/2023, 8:42 PMryan
01/23/2023, 8:42 PMryan
01/23/2023, 8:43 PMbdw429s
01/23/2023, 8:43 PMryan
01/23/2023, 8:43 PMryan
01/23/2023, 8:43 PMbdw429s
01/23/2023, 8:44 PMryan
01/23/2023, 8:44 PMryan
01/23/2023, 8:44 PMbdw429s
01/23/2023, 8:44 PM~/
in your bullet train means your user home. ~
is a linux convention, but bullet train and CommandBox use it as wellryan
01/23/2023, 8:45 PMryan
01/23/2023, 8:49 PM