Fix CrisisCleanup admin user creation

This commit is contained in:
Disassembler 2019-12-01 14:46:45 +01:00
parent 515672c170
commit d94db19410
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
2 changed files with 5 additions and 2 deletions

View File

@ -31,9 +31,8 @@ cp cc_conf/initializers/devise.rb /srv/crisiscleanup/cc_conf/initializers/devise
cp cc_conf/environments/production.rb /srv/crisiscleanup/cc_conf/environments/production.rb
# Populate database
#envsubst <cc_conf/db/seeds.rb >/var/lib/lxc/crisiscleanup/crisiscleanup/srv/crisiscleanup/db/seeds.rb # TODO bud volat User.create! zvlast nebo vyresit jinak
lxc-execute crisiscleanup -- rake db:schema:load
lxc-execute crisiscleanup -- rake db:seed
envsubst <adminpwd.rb | lxc-execute crisiscleanup -- sh -c 'cd /srv/crisiscleanup; bin/rails console -e production'
# Install config update script
cp update-conf.sh /srv/crisiscleanup/update-conf.sh

View File

@ -0,0 +1,4 @@
User.create!([
{email: "${CRISISCLEANUP_ADMIN_EMAIL}", password: "${CRISISCLEANUP_ADMIN_PWD}", name: "${CRISISCLEANUP_ADMIN_USER}", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 1, legacy_organization_id: 1, current_sign_in_at: "2016-07-15 03:45:59", last_sign_in_at: "2016-06-08 16:56:37", current_sign_in_ip: "1.1.1.1", last_sign_in_ip: "173.164.56.105", referring_user_id: nil, admin: true, role: nil, mobile: nil, accepted_terms: true, accepted_terms_timestamp: "2017-09-18 20:46:31", title: nil}
])
quit