Minimal changes required to bind the host gemp-swccg-async/src/web/ folder to the correct location in the docker container. This makes modifications to the web app easier to develop and test by removing the manual steps required to rebuild the application with maven, zip and replace the folder in the container and refresh.
Implementation Steps
A new environment variable defines if it is a prod or test build
This defaults to prod to mimic previous behavior. Since there was no flag everything was a "prod" build
The Dockerfile where "default parameters" for a "test" environment is updated
The two HTTP handlers both have a property that indicates if the app is local or prod
I don't know enough about Java or the app to find a way to inject this configuration. I do hate logic in constructors... but this seems reasonable
Updated Dockerfile to no longer copy the web folder manually
Updated the docker-compose.yml file to bind the host web folder into the container
Testing
I validated the current behavior for making any changes in an HTML or JS file were as follows:
Make change
Refresh page in UI
See the changes are not represented
Stop the docker containers
Following a restart the the changes are still not represented
Delete the docker image
Following a deletion of the container and then the image, docker-compose up and the changes are not represented
Run mvn clean install
After deleting the container, the image and then rebuilding the changes are finally represented
Minimal changes required to bind the host
gemp-swccg-async/src/web/
folder to the correct location in the docker container. This makes modifications to the web app easier to develop and test by removing the manual steps required to rebuild the application with maven, zip and replace the folder in the container and refresh.Implementation Steps
Dockerfile
where "default parameters" for a "test" environment is updatedDockerfile
to no longer copy the web folder manuallydocker-compose.yml
file to bind the host web folder into the containerTesting
I validated the current behavior for making any changes in an HTML or JS file were as follows:
docker-compose up
and the changes are not representedmvn clean install
The current flow is now:
With a
local
buildWith a
production
build304
(not modified)