Skip to content
Snippets Groups Projects
Commit 6814714f authored by Bob Mottram's avatar Bob Mottram
Browse files

Install npm and yarn

parent 52e503c3
No related branches found
No related tags found
No related merge requests found
......@@ -97,7 +97,19 @@ function install_peertube_base {
cd ${PEERTUBE_DIR}/peertube-latest || exit 35685
chown -R peertube:peertube $PEERTUBE_DIR
sudo -H -u peertube npm install
sudo -H -u peertube npm install npm@5.8.0
sudo -H -u peertube npm install yarn@1.10.1
if [ ! -f "${PEERTUBE_DIR}/.bashrc" ]; then
echo "PATH=${PEERTUBE_DIR}/peertube-latest/node_modules/yarn/bin:${PEERTUBE_DIR}/peertube-latest/node_modules/npm/bin:\$PATH" > "${PEERTUBE_DIR}/.bashrc"
else
if ! grep -q "PATH=${PEERTUBE_DIR}" "${PEERTUBE_DIR}/.bashrc"; then
echo "PATH=${PEERTUBE_DIR}/peertube-latest/node_modules/yarn/bin:${PEERTUBE_DIR}/peertube-latest/node_modules/npm/bin:\$PATH" >> "${PEERTUBE_DIR}/.bashrc"
fi
fi
chown peertube:peertube "${PEERTUBE_DIR}/.bashrc"
sudo -H -u peertube NPM_CONFIG_PREFIX=${PEERTUBE_DIR}/peertube-latest/node_modules/npm NODE_CONFIG_DIR=${PEERTUBE_DIR}/config yarn install --production --pure-lockfile
peertube_tcp_tuning
}
......@@ -1095,7 +1107,7 @@ function install_peertube {
fi
groupadd peertube
useradd -c "PeerTube system account" -d $PEERTUBE_DIR -m -r -g peertube peertube
useradd -c "PeerTube system account" -d $PEERTUBE_DIR -m -r -g peertube -s /bin/bash peertube
peertube_create_database
......@@ -1133,8 +1145,12 @@ function install_peertube {
peertube_import_from_syncthing
cd $PEERTUBE_DIR/peertube-latest || exit 23468724
NODE_CONFIG_DIR=$PEERTUBE_DIR/config NODE_ENV=production npm run reset-password -- -u root
set_completion_param "peertube version" "$PEERTUBE_VERSION"
set_completion_param "peertube domain" "$PEERTUBE_DOMAIN_NAME"
APP_INSTALLED=1
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment