Add Kanboard admin password generation
This commit is contained in:
parent
4fcaf89aa8
commit
153c6b2572
@ -38,6 +38,7 @@ psql -f /srv/kanboard/app/Schema/Sql/postgres.sql kanboard kanboard
|
|||||||
envsubst <${SOURCE_DIR}/kanboard/srv/kanboard/config.php >/srv/kanboard/config.php
|
envsubst <${SOURCE_DIR}/kanboard/srv/kanboard/config.php >/srv/kanboard/config.php
|
||||||
export KANBOARD_ADMIN_USER=admin
|
export KANBOARD_ADMIN_USER=admin
|
||||||
export KANBOARD_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
|
export KANBOARD_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
|
||||||
|
export KANBOARD_ADMIN_HASH=$(php -r "echo password_hash('${KANBOARD_ADMIN_PWD}', PASSWORD_BCRYPT);")
|
||||||
envsubst <${SOURCE_DIR}/kanboard/tmp/kanboard-adminpwd.sql >/tmp/kanboard-adminpwd.sql
|
envsubst <${SOURCE_DIR}/kanboard/tmp/kanboard-adminpwd.sql >/tmp/kanboard-adminpwd.sql
|
||||||
psql -f /tmp/kanboard-adminpwd.sql kanboard kanboard
|
psql -f /tmp/kanboard-adminpwd.sql kanboard kanboard
|
||||||
unset PGPASSWORD
|
unset PGPASSWORD
|
||||||
@ -60,6 +61,3 @@ cp ${SOURCE_DIR}/kanboard/etc/cron.d/kanboard /etc/cron.d/kanboard
|
|||||||
|
|
||||||
# Add portal application definition
|
# Add portal application definition
|
||||||
${SOURCE_DIR}/basic/portal-app-manager.py kanboard "/kanboard/" "${KANBOARD_ADMIN_USER}" "${KANBOARD_ADMIN_PWD}"
|
${SOURCE_DIR}/basic/portal-app-manager.py kanboard "/kanboard/" "${KANBOARD_ADMIN_USER}" "${KANBOARD_ADMIN_PWD}"
|
||||||
|
|
||||||
# TODO: Admin pwd set
|
|
||||||
# TODO: Portal card
|
|
||||||
|
@ -2,4 +2,4 @@ UPDATE settings SET value = 'cs_CZ' WHERE option = 'application_language';
|
|||||||
UPDATE settings SET value = 'Europe/Prague' WHERE option = 'application_timezone';
|
UPDATE settings SET value = 'Europe/Prague' WHERE option = 'application_timezone';
|
||||||
UPDATE settings SET value = 'd.m.Y' WHERE option = 'application_date_format';
|
UPDATE settings SET value = 'd.m.Y' WHERE option = 'application_date_format';
|
||||||
|
|
||||||
-- UPDATE users SET password = '${KANBOARD_ADMIN_PWD}' WHERE username = 'admin';
|
UPDATE users SET password = '${KANBOARD_ADMIN_HASH}' WHERE username = 'admin';
|
||||||
|
Loading…
Reference in New Issue
Block a user