Fix CrisisCleanup admin user creation
This commit is contained in:
parent
515672c170
commit
d94db19410
@ -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
|
cp cc_conf/environments/production.rb /srv/crisiscleanup/cc_conf/environments/production.rb
|
||||||
|
|
||||||
# Populate database
|
# 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: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
|
# Install config update script
|
||||||
cp update-conf.sh /srv/crisiscleanup/update-conf.sh
|
cp update-conf.sh /srv/crisiscleanup/update-conf.sh
|
||||||
|
4
lxc-apps/crisiscleanup/install/adminpwd.rb
Normal file
4
lxc-apps/crisiscleanup/install/adminpwd.rb
Normal 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
|
Loading…
Reference in New Issue
Block a user