Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve frontend caching situation #216

Merged
merged 7 commits into from
Sep 23, 2024

Conversation

omar-selo
Copy link
Collaborator

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 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 removes index.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.

Resolved issues

https://warthogs.atlassian.net/browse/RTW-359

Documentation

Web service API changes

Tests

Ran it locally and everything seemed fine.

@andrejvelichkovski andrejvelichkovski merged commit dc95ed0 into main Sep 23, 2024
1 of 2 checks passed
@andrejvelichkovski andrejvelichkovski deleted the improve-frontend-caching-situation branch September 23, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants