worklenz
worklenz copied to clipboard
[PR] Resized the sizes of final images for frontend and backend below 150MB
This PR would bring the final image sizes of the docker build below 150MB, making it easier (Saves bandwidth) for any K8s pod or a docker run Instance to re-instantiate the application.
The approach of multi-layered docker images are followed.
Main Changes
- Instead of single worker of Angular app treating the client requests directly, we have utilized a nginx frontend which treats requests via port 80 and 443 (Not 4200).
- Backend utilizes alpine images in runner stage. Though we wanted to use the same for
builder, there are some alpine linux issues which forced us to make use of the same base image which used to work. Somehow, still the backend image could be resolved to 143MBs. - Frontend image size is 21.8 MB
@pasanchamikara please sign the CLA , then we will evaluate
@kalinga777 done!
Great common optimizations for a docker build.
Maybe switch to caddy for the serving to get easy automatic HTTPS?