-
Notifications
You must be signed in to change notification settings - Fork 353
Refector: Do the npm compile as a Build step in docker #1150
base: dev
Are you sure you want to change the base?
Conversation
This removes the requirement of npm on the host system and removes an additional manual step during the building of the docker image. Updated the documentation accordingly and fixed a typo.
Well, the bad thing about this is that it causes the GitHub Actions pipeline to build the front end three times, and its pretty slow on armhf. I also still need to compile the front-end for the bare metal release. |
I did wonder about this as well like @toxix . But I then realised the same problem as @jonaswinkler . The only way I'd see to get both whitch is hacky at best and worse then the current situation at worst. Would be to include the frontend-building in the docker. But somehow manage to make it conditional. This way the Github Action could build it once and copy it in. And a person building it localy could just run the Dockerfile without having to precompile the frontend. |
If you are concerned about building speed we could implement some build caching in the pipeline. For example like mentioned here: https://gist.github.com/UrsaDK/f90c9632997a70cfe2a6df2797731ac8 Regards local/bar metal deployments you can run something like
as the directory is mounted it will be also stay compiled outside, or if you like just run the npm commands on bare metal. |
Uhm well, you can try adapting the pipeline of course. I recall that the build would not even finish on armhf. The failure is because you deleted the script that's used by the pipeline to build the frontend. |
Overlooked the github pipeline implications in my first commit. Have changed things a bit, let's see if that is already doing it's job or if I need to work more on it. |
This should allow to use docker building the frontend artifacts and reusing them in the bare metal release.
As frontend compile step is done now inside docker container, we do not need to do it before. This is updating the documentation so it reflects the code changes made.
From automatic codereview. We should use a specific node version. We are using the same version that was used before in the github pipeline.
This removes the requirement of npm on the host system and removes an
additional manual step during the building of the docker image.
Updated the documentation accordingly and fixed a typo.