nodejs.org: Build complexity (added rsync)

#1654 added the user survey microsite and the build failed on the server. The reason this happened is that we run the build inside a Docker container for a little layer of security but the build added more complexity than the container is prepared for.

https://github.com/nodejs/build/blob/master/setup/www/resources/scripts/build-site.sh

The script just does a docker run node:latest ... and does some very minor stuff, adding a uid and gid and setting some basic npm bits before running npm install.

#1654 added rsync into an npm script and this isn’t available in node:latest. For now I’ve added apt-get update && apt-get install -y rsync to the beginning of the bash script that’s executed inside the container. This adds quite a bit of latency to the build, each commit to this repo will be running that and it’s pretty slow.

One solution is to create a persistent docker container that has this in it, but that adds maintenance burden that is likely to be out of mind and will get out of date really quickly. Another solution is to remove rsync and rely on something more simple. Perhaps a cp -a is enough? Or, use https://www.npmjs.com/package/cpr as a build dependency and use that instead?

What do you think @fhemberger? I’d like to remove that additional piece of scripting as soon as possible to speed up deploys, unless you think the additional time cost is worth it.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 27 (27 by maintainers)

Most upvoted comments

Just pushed the hashtags and download links.