From 2d13b29965482cebfd2070d5acf010af75416925 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 15 Jan 2018 18:23:17 +0100 Subject: Remove npm run upgrade Use command from production.md instead --- support/doc/production.md | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'support') diff --git a/support/doc/production.md b/support/doc/production.md index 77c9a086d..af137fe9a 100644 --- a/support/doc/production.md +++ b/support/doc/production.md @@ -26,17 +26,14 @@ $ sudo -u postgres createdb -O peertube peertube_prod ### Prepare PeerTube directory -Check the latest release: https://github.com/Chocobozzz/PeerTube/releases or the release version you want. -We assume in the following commands the version is 0.42.42: - ``` -$ VERSION="0.42.42" && \ +$ VERSION=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4) && \ cd /home/peertube && \ sudo -u peertube mkdir config storage versions && \ cd versions && \ - sudo -u peertube wget "https://github.com/Chocobozzz/PeerTube/releases/download/v${VERSION}/peertube-v${VERSION}.zip" && \ - sudo -u peertube unzip peertube-v${VERSION}.zip && sudo -u peertube rm peertube-v${VERSION}.zip && \ - cd ../ && sudo -u peertube ln -s versions/peertube-v${VERSION} ./peertube-latest && \ + sudo -u peertube wget "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip" && \ + sudo -u peertube unzip peertube-${VERSION}.zip && sudo -u peertube rm peertube-${VERSION}.zip && \ + cd ../ && sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest && \ cd ./peertube-latest && sudo -u peertube yarn install --production --pure-lockfile ``` @@ -227,11 +224,12 @@ $ NODE_ENV=production npm run reset-password -- -u root ## Upgrade -The following commands will upgrade the source (according to your current -branch), upgrade node modules and rebuild client application: - ``` -# systemctl stop peertube -$ npm run upgrade-peertube -# systemctl start peertube +$ VERSION=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4) && \ + cd /home/peertube/versions && \ + sudo -u peertube wget "https://github.com/Chocobozzz/PeerTube/releases/download/${VERSION}/peertube-${VERSION}.zip" && \ + sudo -u peertube unzip peertube-${VERSION}.zip && sudo -u peertube rm peertube-${VERSION}.zip && \ + cd ../ && sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest && \ + cd ./peertube-latest && sudo -u peertube yarn install --production --pure-lockfile && \ + sudo systemctl restart peertube ``` -- cgit v1.2.3