From personal experience, Webpack builds are very RAM intensive, can easily consume a gigabyte+ of RAM if you’re not careful. It would be best to build locally and upload the artifacts to Toolforge.
—Aoyan Sarkar > On Aug 24, 2024, at 6:09 AM, Sportzpikachu via Cloud > <cloud@lists.wikimedia.org> wrote: > > How long does your build take locally? It might be timing out on toolforge. > If you're simply hosting static files, it might be easier to build on Github > CI and then just wget the built artifact into `$HOME/www/static` > (<https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web#Serving_static_files>). > >> On 24 Aug 2024, at 17:59, Maciej Jaros <e...@wp.pl> wrote: >> >> Hi, >> >> Is it allowed to build a webpack app in Toolforge environment? >> >> I'm asking because I tried to build an Agular app (old ng) for Wiki Loves >> Monuments and failed. I did found this instructions: >> https://wikitech.wikimedia.org/wiki/Help:Toolforge/Node.js#Running_npm_with_webservice_shell >> And Node18 was installed OK, running `npm i` was OK, but my build failed. >> >> My steps: >> ```bash >> become zabytki >> # install >> webservice --backend=kubernetes node18 shell >> # clone (or pull) >> mkdir ~/testrepo >> cd ~/testrepo >> git clone https://github.com/Eccenux/wlm-zabytki-mapa.git ./ >> # build >> npm i >> npm run build-prod >> >> ``` >> >> And that last part fails at 92%: >>> 92% sealing asset processing TerserPlugin*Killed* >> >> The build-prod script is defined as: >> webpack --progress --mode production --env=prod >> The webpack script is here: >> https://github.com/Eccenux/wlm-zabytki-mapa/blob/master/webpack.config.js >> >> Would be grateful for any pointers. For now I'm building locally and >> deploying assets to github (so that I can skip the build step on Toolforge), >> but when I'm on vacation setting up build env is a complication I'd like to >> avoid :) >> >> Cheers, >> Maciej Nux. >> _______________________________________________ >> Cloud mailing list -- cloud@lists.wikimedia.org >> List information: >> https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/ > > _______________________________________________ > Cloud mailing list -- cloud@lists.wikimedia.org > List information: > https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/ _______________________________________________ Cloud mailing list -- cloud@lists.wikimedia.org List information: https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/