-
Purpose: reduce webpack build time by
- pre-install and pre-build vendor then zip the repo
- distribute the webpack workloads of apps into different container which can scales horizontally
-
Testing repo: webpack-code-split
- all apps are sharing same
vendor
bundle. - it can
build-vendor
andnpm run build-apps -- --env apps=app1,app2
separately
- all apps are sharing same
cd docker-webpack-runner && docker build . -t webpackrunner
2. Start File Server - go-simple-upload-server
git clone https://github.com/mayth/go-simple-upload-server
cd go-simple-upload-server
- change
maxUploadSize
to larger size insimple_upload_server.go
docker build . -t mayth/simple-upload-server
to rebuild imagemkdir $HOME/tmp
make a local workSpace$HOME/tmp
for the fileServerdocker run -p 25478:25478 -v $HOME/tmp:/var/root mayth/simple-upload-server -token f9403fc5f537b4ab332d /var/root
- now the file server will run in the background