Cache bust JavaScript files so that users don't need to hard refresh their browser when we push updates.
Additionally, adds build directory to .dockerignore. Turns out if you run flutter build web before running docker build on front-end then the image produced is bugged. Namely, the index.html file inside it is not the one produced by flutter, but the default index.html of nginx. Digging deeper into why this is. I found that our docker image copies the contents of the frontend directory into the image which includes index.html if flutter build web was already run. Then when flutter build runs it removesindex.html for some reason. So we end up with no index.html whatsoever. So when we copy the web build directory into nginx's directory, it doesn't overwrite nginx's index.html. This is a very annoying issue to debug locally. So adding build to .dockerignore will solve it in the future.
Description
Cache bust JavaScript files so that users don't need to hard refresh their browser when we push updates.
Additionally, adds
build
directory to.dockerignore
. Turns out if you runflutter build web
before runningdocker build
on front-end then the image produced is bugged. Namely, theindex.html
file inside it is not the one produced by flutter, but the defaultindex.html
of nginx. Digging deeper into why this is. I found that our docker image copies the contents of the frontend directory into the image which includesindex.html
ifflutter build web
was already run. Then whenflutter build
runs it removesindex.html
for some reason. So we end up with noindex.html
whatsoever. So when we copy the web build directory into nginx's directory, it doesn't overwrite nginx'sindex.html
. This is a very annoying issue to debug locally. So addingbuild
to.dockerignore
will solve it in the future.Resolved issues
https://warthogs.atlassian.net/browse/RTW-359
Documentation
Web service API changes
Tests
Ran it locally and everything seemed fine.