Following the directions in FOLIO Order Import Tool code repository's README, this gist contains the configuration servlet properties XML files for two instances, one for FOLIO production and one for FOLIO stage environments.
A docker image is generated from the Dockerfile
in this GIST with the following files being copied:
- The order.war file to
sul-prod.war
andsul-stage.war
- The Context XML files,
sul-prod.xml
andsul-stage.war
for each environment - Specific property configuration files for stage and production,
import-sul-prod.properties
andimport-sul-stage.properties
(NOTE: these files are not included in this GIST as they contain Okapi login information) - Docker image is launched with port 8080 published
Apache2 runs as a service on the VM.
- Apache2 Reverse Proxy set-up in VirtualHost directive (attached conf file has SSL details obscured) to proxy to running Docker container running on port 8080
With this setup, the Contexts for the sul-prod
and sul-stage
are present when the server is live:
However, when clicking on either of these context, the following directory view is shown instead of the running instance of the FOLIO Order Import Tool:
@jermnelson I think that this is expected behavior for the web app -- it is likely less sophisticated than you expect.
Each instance of the web app expects that it is running with the path of
/
. So you need to have a host name for each instance that is handled by a separateVirtualHost
record in the Apache httpd server configuration, which would then useProxyPass
to send the request to the appropriate path on the backend -- in this case,http://localhost:8080/sul-prod
orhttp://localhost:8080/sul-stage
, I think. In short, I think your Jetty config is correct, but the Apache httpd config and DNS entries may not all be lined up the way they need to be.IMO this may be a bit of premature optimization, particularly to be running both stage and prod in the same container, because if you change the configuration for stage you may need to restart both prod and stage to pick up the change (not 100% sure about that, to be fair). The web app is not so resource intensive that it would be a burden to run multiple container instances, I would think.
One other thing to consider is whether it would be easier to run this in your cluster with an nginx ingress rather than on a VM with Apache httpd.