-
Notifications
You must be signed in to change notification settings - Fork 4
Make UI dev docker image self-sufficient #836
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
Open
f-PLT
wants to merge
14
commits into
main
Choose a base branch
from
feat/add-backend-dev-compose-override
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This starts the UI in pre-production build mode, which makes the frontend much quicker to load between compose restarts
✅ Deploy Preview for antenna-preview canceled.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes comments from previous PR #829 .
List of Changes
vite.config
to identify clearly when a local docker image is used for the frontendDetailed Description
As suggested, the UI docker approach is now completely self-sufficient and separated from a developer's local development setup for the UI.
A developer wanting to work on the UI with docker now doesn't need to have Node installed locally at all (although at some point it still is worth it to do so). A developer working locally will have node/yarn installed locally should see their workflow stays the same as before.
The change proposed to
ui/vite.config.ts
is because currently, building the UI requires access to the commit history to tag each build. While copying the.git
folder at build time could work, it would also have required to change the whole build context of the UI service, remove theui/
folder from the main.dockerignore
and possibly refactor all the other docker files in the project to make sure no adverse effects came of such a change.Since we are considering reworking the docker files soon anyway, I figured it wasn't worth the trouble right now. It does also have the benefit of clearly signaling that a pre-build docker image is being used and reminds the user to make sure to rebuild the image when necessary.
Using the optional compose override still displays the appropriate build number, like before.
How to Test the Changes
If there's a need to update the frontend while the compose stack is running, use the following command to rebuild the frontend and load the new changes
(and remember to refresh your browser after!).
# Run docker compose with the override config docker compose -f docker-compose.yml -f docker-compose-frontend-dev.override.yml up -d
Screenshots
N/A
Deployment Notes
Potentially worth to make sure that the changes to
vite.config.ts
do not cause unforeseen problems with the Netlify deployment structureChecklist