Generating frontend automatically during the build variant
Generating frontend automatically during the build variant.
npm run build-frontend
has been added as the command for the build
section in the build
variant. That way the frontend will be automatically generated every time the service docker image is built. The public
folder where the frontend is built as a static site has been added to .gitignore
.
The way to generate the docker image from the blubber file is by running the following command:
docker build --target development -f .pipeline/blubber.yaml -t mpic .
After that, you can just start the service by running: docker run -d -p 8080:8080 --name mpic mpic
. Going to http://localhost:8080
you should see the frontend properly generated as static content.
I have also taken the opportunity to fix a tiny bug I saw where logging an error when requesting /instruments
. It's something we should improved but, at this time, we were not responding anything and failing wrongly.