admin creation
This commit is contained in:
parent
b59702f31e
commit
f40baa4699
@ -72,6 +72,5 @@ msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
|
||||
echo -e "${INFO}${YW} Default Credentials:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}Username: admin${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}Password: Check /opt/discourse/.env${CL}"
|
||||
echo -e "${INFO}${YW} Admin Setup:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}Create the first account in the web UI (use admin@local to match developer emails)${CL}"
|
||||
|
||||
@ -105,16 +105,8 @@ set +a
|
||||
$STD bundle exec rails assets:precompile
|
||||
msg_ok "Built Discourse Assets"
|
||||
|
||||
msg_info "Creating Discourse Admin User"
|
||||
cd /opt/discourse
|
||||
export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
|
||||
eval "$(rbenv init - bash)" 2>/dev/null || true
|
||||
export RAILS_ENV=production
|
||||
set -a
|
||||
source /opt/discourse/.env
|
||||
set +a
|
||||
$STD bundle exec rails runner "User.create!(email: 'admin@local', username: 'admin', password: '${DISCOURSE_DB_PASS}', admin: true)" || true
|
||||
msg_ok "Created Discourse Admin User"
|
||||
msg_info "Preparing Admin Onboarding"
|
||||
msg_ok "Automatic admin bootstrap skipped (use first signup in UI with admin@local)"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/discourse.service
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user