Closed jamiejackson closed 7 years ago
Jamie You can mount multiple directories into the image but only one directory can be the web root. What is the purpose of the other folders
I've got directories like, model
, lib
, test
, etc. that are at the same level as wwwroot
--directories used by the app, but outside of the web root. I would guess that I'm not the only one with applications that have a similar structure.
I forgot that I had to do a trick even with the official Lucee image:
Dockerfile
RUN \
set -x \
&& sed \
-i 's+<Context path="" docBase="/var/www/">+<Context path="" docBase="/var/www/wwwroot">+' \
'/usr/local/tomcat/conf/server.xml'
docker-compose.yml
lucee:
...
volumes:
- ./deployment_root:/var/www
...
... but I'm not Undertow-savvy, so I don't know how to do a similar trick with it.
@jamiejackson : the convention APP_DIR
for the CommandBox image is /app
, therefore, the path you mount those files in to will either need to be /app/
or you'll need to pass an APP_DIR
environment variable, telling it where to start up the server from. If your server uses a subdirectory, then you'll want to configure your server.json to tell CommandBox where that root is.
For example, if you mounted the above file system in to the /app
directory, you would specify an environment variable for APP_DIR
as /app/wwwroot
.
Hope that helps!
Yes, thanks, @jclausen!
In SCM, I have a bunch of directories at the same level as wwwroot; e.g.:
So I think I want to be able to do something like:
Is there already a way to do this that I'm overlooking?