Use a node_modules symlink in /etc/gitlab instead of setting NODE_PATH
This commit is contained in:
parent
c16076696d
commit
0139ac7e71
2 changed files with 4 additions and 1 deletions
3
debian/gitlab.links
vendored
3
debian/gitlab.links
vendored
|
@ -2,6 +2,9 @@ var/lib/gitlab/public usr/share/gitlab/public
|
|||
var/lib/gitlab/shared usr/share/gitlab/shared
|
||||
var/lib/gitlab/db usr/share/gitlab/db
|
||||
var/lib/gitlab/node_modules usr/share/gitlab/node_modules
|
||||
# This is required for webpack to resolve direct dependencies mentioned
|
||||
# in config/webpack.config.js, because it is a symbolic link to /etc/gitlab
|
||||
var/lib/gitlab/node_modules etc/gitlab/node_modules
|
||||
var/lib/gitlab/package.json usr/share/gitlab/package.json
|
||||
var/lib/gitlab/yarn-error.log usr/share/gitlab/yarn-error.log
|
||||
var/lib/gitlab/yarn.lock usr/share/gitlab/yarn.lock
|
||||
|
|
2
debian/rake-tasks.sh
vendored
2
debian/rake-tasks.sh
vendored
|
@ -53,4 +53,4 @@ runuser -u ${gitlab_user} -- sh -c '/usr/bin/bundle exec rake tmp:cache:clear as
|
|||
echo "Webpacking..."
|
||||
# Workaround for webpack crashing with nodejs 10 - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=956211
|
||||
# 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_PATH="node_modules" NODE_OPTIONS="--max-old-space-size=4096" webpack --config config/webpack.config.js'
|
||||
runuser -u ${gitlab_user} -- sh -c 'NODE_ENV="production" NODE_OPTIONS="--max-old-space-size=4096" webpack --config config/webpack.config.js'
|
||||
|
|
Loading…
Reference in a new issue