From 7f5cc3a3bd3c722f79e9272b18d537c0bc52ebce Mon Sep 17 00:00:00 2001 From: bserie Date: Tue, 28 Feb 2017 14:07:10 +0100 Subject: [PATCH] update modifications sur nodejs --- HowtoGitlab/8.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/HowtoGitlab/8.md b/HowtoGitlab/8.md index 6ac93ce3..151f1b59 100644 --- a/HowtoGitlab/8.md +++ b/HowtoGitlab/8.md @@ -11,13 +11,13 @@ title: Howto GitLab Nous installons la version **8** sous **Debian 8** (Jessie) avec une approche multi-instances. -GitLab s'appuie sur Git, Ruby, Go, PostgreSQL et Redis. +GitLab s'appuie sur Git, Ruby, Go, NodeJS, PostgreSQL et Redis. > **Note** : dans les exemples ci-dessous, on va créer une instance nommée *foo* ## Dépendances -GitLab nécessite des versions très récentes de Git, Ruby et Go. +GitLab nécessite des versions très récentes de Git, Ruby, Go et NodeJS. On utilise pour l'instant des versions de Jessie Backports et Stretch via un « pinning » APT : @@ -40,12 +40,14 @@ Pin: release n=stretch Pin-Priority: 999 ~~~ +Pour NodeJS, il faut l'installer [ainsi](https://wiki.evolix.org/HowtoNodeJS). + On peut ainsi installer toutes les dépendances pour Gitlab : ~~~ # apt install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev \ libffi-dev curl openssh-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate \ -python-docutils pkg-config cmake nodejs bundler ruby2.3 git golang +python-docutils pkg-config cmake nodejs bundler ruby2.3 git golang nodejs ~~~ ## Compte UNIX @@ -370,7 +372,8 @@ $ bundle exec rake gitlab:env:info RAILS_ENV=production Compilation des assets : ~~~ -$ bundle exec rake assets:precompile RAILS_ENV=production +$ npm install --production +$ bundle exec rake gitlab:assets:compile RAILS_ENV=production NODE_ENV=production ~~~ Démarrage de l'instance : @@ -486,13 +489,10 @@ Si tout est au vert, la migration s'est bien passée ! La version 8.17 ajoute une dépendance à NodeJS/NPM pour les assets. Il faut donc l'[installer](https://wiki.evolix.org/HowtoNodeJS), et faire quelques corrections, puis « packer » les assets. ``` -# ln -s /usr/bin/nodejs /usr/bin/node # sudo -iu foo $ cd gitlab -$ git config --global url."https://github.com/".insteadOf git@github.com:github: -$ git config --global url."https://".insteadOf git:// -$ npm install -$ bundle exec rake webpack:compile RAILS_ENV=production +$ npm install --production +$ bundle exec rake gitlab:assets:clean gitlab:assets:compile cache:clear RAILS_ENV=production ``` ## Mise à jour majeure