Merge branch 'webpack-switch-to-production' into 'master'

Build assets generated by webpack in production mode

See merge request ruby-team/gitlab!5
This commit is contained in:
Praveen Arimbrathodiyil 2020-04-12 12:21:47 +00:00
commit 32d5daa771

View file

@ -49,4 +49,5 @@ runuser -u ${gitlab_user} -- sh -c 'cd /usr/share/gitlab/public/assets && \
echo "Webpacking..."
# Workaround for webpack crashing with nodejs 10 - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=956211
runuser -u ${gitlab_user} -- sh -c 'NODE_OPTIONS="--max-old-space-size=2048" webpack --config config/webpack.config.js'
# Build assets in production mode - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=956508
runuser -u ${gitlab_user} -- sh -c 'NODE_ENV="production" NODE_OPTIONS="--max-old-space-size=4096" webpack --config config/webpack.config.js'