Brent
06/11/2024, 9:15 PMbdw429s
06/11/2024, 9:17 PMbdw429s
06/11/2024, 9:17 PMbdw429s
06/11/2024, 9:17 PMbdw429s
06/11/2024, 9:17 PMinstall testbox
bdw429s
06/11/2024, 9:18 PMbdw429s
06/11/2024, 9:18 PMtestbox generate harness
Brent
06/11/2024, 9:20 PMBrent
06/11/2024, 9:23 PMBrent
06/11/2024, 10:04 PM/wwwroot/tests/runner.cfm [/app/wwwroot/tests/runner.cfm] not found.
I'm guessing it has something to do with the mappings in the tests/application.cfc file. At the risk of looking like a doofus, I'm just going to say it: I don't understand what mappings are or what that is doing. I know it's something to do with making folders visible or findable by CF/Lucee, but I don't understand how the syntax works, i.e. what the path on the left is vs. the path on the right side of the assignment =
etc.
Pretty sure my problem is in the mapping. There is a bind mount of everything on my local to an /app directory, so going to try adding paths under /app on either side.Brent
06/11/2024, 10:07 PMexpandPath("/")
that was generated automatically, not sure what that is or if i can just remove it.Brent
06/11/2024, 10:15 PMgavinbaumanis
06/12/2024, 6:07 AMc:\my\convoluted\path\tests
or Linux /my/convoluted/path/tests
(this is just an example - you place the folders where you want them to live.
Then the "mapping" is how you tell CF / Lucee - Where to find the physical files AND how to mount them in your application.
so if you want <https://mywebsite.com/tests>
to to be the url you hit you have a mapping like the following in you config.json (if you're using commandbox)
Windows
"CFMappings": {
"/tests": {
"INSPECTTEMPLATE": "always",
"PHYSICAL": "c:\my\convoluted\path\tests"
}
}
Linux
"CFMappings": {
"/tests": {
"INSPECTTEMPLATE": "always",
"PHYSICAL": "/my/convoluted/path/tests"
}
}
if for example you wanted the following URL to work;
<https://mywebsite.com/my/really/really/convoluted/path/tests>
you would use;
"CFMappings": {
"/my/really/really/convoluted/path/tests": {
"INSPECTTEMPLATE": "always",
"PHYSICAL": "/my/convoluted/path/tests"
}
}
In CFML - just think Shortcut / symlink when you hear "mapping".
At what path "in" my application do I want XXX directory to appear?
NOTE:
The (Windows/linux) user account that runs CFML needs access to the physical location.
JUST having the mapping isn't enough.
NOTE2:
You don't HAVE to use mappings.
You CAN use a literal windows "soft" shortcut or a Linux symlink to place the directory you need.
The difference is ownership / where the configuration lies...
Does your IT dept control the OS/infrastructure?'
Do you have rights to create OS level shortcuts/symlinks?
Do you want the "mappings" controlled by the CFML application's configuration?
It is "standard convention" to use CFML mappings as opposed to OS shortcuts - but it is NOT a requirement.
As for having the tests directory as being browsable / accessible...
Use your web server's configuration to set the permissions appropriately. - just as you would for an applications "uploads" directory - so that they aren't accessible/browsable to the general public.
Use a Web Application Firewall (WAF) to limit access to the directory to certain IPs or via a specific URL...Brent
06/12/2024, 2:12 PMwhere/my/stuff/exists
= where/Lucee/thinks/my/stuff/exists
Brent
06/12/2024, 2:44 PMBrent
06/12/2024, 10:00 PMthis.mappings[/mounted/path/Lucee/sees]
= /actual/path/where/my/stuff/is