Admin password stuff
authorChocobozzz <florian.bigard@gmail.com>
Fri, 27 Jan 2017 10:18:53 +0000 (11:18 +0100)
committerChocobozzz <florian.bigard@gmail.com>
Fri, 27 Jan 2017 10:18:53 +0000 (11:18 +0100)
README.md
package.json
scripts/help.sh
scripts/reset-password.js

index a25f058f8a8f1fd4f75986b54549d38a72d9f1a4..a1198019c666435bcb20e99b391ee85f90c4ce45 100644 (file)
--- a/README.md
+++ b/README.md
@@ -154,6 +154,10 @@ Finally, run the server with the `production` `NODE_ENV` variable set.
 
     $ NODE_ENV=production npm start
 
+The administrator password is automatically generated and can be found in the logs. You can set another password with:
+
+    $ NODE_ENV=production npm run reset-password -- -u root
+
 **Nginx template** (reverse proxy): https://github.com/Chocobozzz/PeerTube/tree/master/support/nginx
 
 **Systemd template**: https://github.com/Chocobozzz/PeerTube/tree/master/support/systemd
@@ -176,6 +180,8 @@ In this mode, the server will run requests between pods more quickly, the videos
 
     $ npm run dev
 
+The administrator password is displayed in the command output and can be found in the logs.
+
 ### Test with 3 fresh nodes
 
     $ npm run clean:server:test
index 010934a712ed0119902da8f8f935e85d8f3b5134..5a9e943c37e13ccb665a51600d39aa8930b0e669 100644 (file)
@@ -27,6 +27,7 @@
     "danger:clean:dev": "scripty",
     "danger:clean:prod": "scripty",
     "danger:clean:modules": "scripty",
+    "reset-password": "scripty",
     "play": "scripty",
     "dev": "scripty",
     "start": "node server",
index 23c460afa42f8387d831d598bf79646d8ec55630..bf4a51279869c5520da408e5eb9a2ee4ef8783c5 100755 (executable)
@@ -2,20 +2,21 @@
 
 printf "############# PeerTube help #############\n\n"
 printf "npm run ...\n"
-printf "  build                -> Build the application for production (alias of build:client:prod)\n"
-printf "  build:client:dev     -> Build the client for development\n"
-printf "  build:client:prod    -> Build the client for production\n"
-printf "  clean                -> Clean the application\n"
-printf "  clean:client         -> Clean the client build files (dist directory)\n"
-printf "  clean:server:test    -> Clean certificates, logs, uploads and database of the test instances\n"
-printf "  watch:client         -> Watch the client files\n"
-printf "  danger:clean:dev     -> /!\ Clean certificates, logs, uploads, thumbnails, torrents and database specified in the development environment\n"
-printf "  danger:clean:prod    -> /!\ Clean certificates, logs, uploads, thumbnails, torrents and database specified by the production environment\n"
-printf "  danger:clean:modules -> /!\ Clean node and typescript modules\n"
-printf "  play                 -> Run 3 fresh nodes so that you can test the communication between them\n"
-printf "  dev                  -> Watch, run the livereload and run the server so that you can develop the application\n"
-printf "  start                -> Run the server\n"
-printf "  check                -> Check the server (according to NODE_ENV)\n"
-printf "  upgrade -- [branch]  -> Upgrade the application according to the [branch] parameter\n"
-printf "  test                 -> Run the tests\n"
-printf "  help                 -> Print this help\n"
+printf "  build                       -> Build the application for production (alias of build:client:prod)\n"
+printf "  build:client:dev            -> Build the client for development\n"
+printf "  build:client:prod           -> Build the client for production\n"
+printf "  clean                       -> Clean the application\n"
+printf "  clean:client                -> Clean the client build files (dist directory)\n"
+printf "  clean:server:test           -> Clean certificates, logs, uploads and database of the test instances\n"
+printf "  watch:client                -> Watch the client files\n"
+printf "  danger:clean:dev            -> /!\ Clean certificates, logs, uploads, thumbnails, torrents and database specified in the development environment\n"
+printf "  danger:clean:prod           -> /!\ Clean certificates, logs, uploads, thumbnails, torrents and database specified by the production environment\n"
+printf "  danger:clean:modules        -> /!\ Clean node and typescript modules\n"
+printf "  play                        -> Run 3 fresh nodes so that you can test the communication between them\n"
+printf "  reset-password -- -u [user] -> Reset the password of user [user]\n",
+printf "  dev                         -> Watch, run the livereload and run the server so that you can develop the application\n"
+printf "  start                       -> Run the server\n"
+printf "  check                       -> Check the server (according to NODE_ENV)\n"
+printf "  upgrade -- [branch]         -> Upgrade the application according to the [branch] parameter\n"
+printf "  test                        -> Run the tests\n"
+printf "  help                        -> Print this help\n"
index 5ae3af9ea93be524869f52a2dbe958625d5a1ee9..49a481a18ae515a8e9a30e1fd49f03225fe3b521 100755 (executable)
@@ -2,8 +2,6 @@
 
 'use strict'
 
-// TODO: document this script
-
 const program = require('commander')
 
 const db = require('../server/initializers/database')