aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/installer.ts
diff options
context:
space:
mode:
authorAxel Viala <axel.viala@darnuria.eu>2019-05-15 00:18:48 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-05-16 09:17:10 +0200
commit3daaa1927474869f8dbaddd6b94b4c071e314e10 (patch)
treeba754d4eacda93e3e3e573b0c3e0a1b7e680114e /server/initializers/installer.ts
parent11b3f14c758e57f9cb5f32d8140fa043094bb3d7 (diff)
downloadPeerTube-3daaa1927474869f8dbaddd6b94b4c071e314e10.tar.gz
PeerTube-3daaa1927474869f8dbaddd6b94b4c071e314e10.tar.zst
PeerTube-3daaa1927474869f8dbaddd6b94b4c071e314e10.zip
Add way to set root password by environment.
Add a condition test to pass by environment a predetermined root password for setting up.
Diffstat (limited to 'server/initializers/installer.ts')
-rw-r--r--server/initializers/installer.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/initializers/installer.ts b/server/initializers/installer.ts
index 127449577..33970f0fa 100644
--- a/server/initializers/installer.ts
+++ b/server/initializers/installer.ts
@@ -128,6 +128,8 @@ async function createOAuthAdminIfNotExist () {
128 128
129 // Our password is weak so do not validate it 129 // Our password is weak so do not validate it
130 validatePassword = false 130 validatePassword = false
131 } else if (process.env.PT_INITIAL_ROOT_PASSWORD) {
132 password = process.env.PT_INITIAL_ROOT_PASSWORD
131 } else { 133 } else {
132 password = passwordGenerator(16, true) 134 password = passwordGenerator(16, true)
133 } 135 }