Fix CrisisCleanup data population
This commit is contained in:
parent
853c3852fd
commit
042a82c463
@ -24,7 +24,7 @@ RUN EOF
|
|||||||
npm install
|
npm install
|
||||||
yarn
|
yarn
|
||||||
|
|
||||||
# Create CrisisCleanup secret
|
# Create dummy CrisisCleanup secret
|
||||||
echo -e "production:\n secret_key_base: $(rake secret)" >/srv/crisiscleanup/config/secrets.yml
|
echo -e "production:\n secret_key_base: $(rake secret)" >/srv/crisiscleanup/config/secrets.yml
|
||||||
|
|
||||||
# Generate static resources
|
# Generate static resources
|
||||||
|
@ -25,7 +25,9 @@ cp -rp ${LAYERS_DIR}/crisiscleanup_2.2.0-200313/srv/crisiscleanup/config ${CC_CO
|
|||||||
export CRISISCLEANUP_ADMIN_USER="Admin"
|
export CRISISCLEANUP_ADMIN_USER="Admin"
|
||||||
export CRISISCLEANUP_ADMIN_EMAIL="admin@example.com"
|
export CRISISCLEANUP_ADMIN_EMAIL="admin@example.com"
|
||||||
export CRISISCLEANUP_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=')
|
export CRISISCLEANUP_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=')
|
||||||
|
export CRISISCLEANUP_SECRET=$(spoc-container exec crisiscleanup -- rake secret)
|
||||||
envsubst <cc_conf/database.yml | install -o 100000 -g 100000 /dev/stdin ${CC_CONF}/database.yml
|
envsubst <cc_conf/database.yml | install -o 100000 -g 100000 /dev/stdin ${CC_CONF}/database.yml
|
||||||
|
envsubst <cc_conf/secrets.yml | install -o 100000 -g 100000 /dev/stdin ${CC_CONF}/secrets.yml
|
||||||
install -o 100000 -g 100000 cc_conf/boot.rb ${CC_CONF}/boot.rb
|
install -o 100000 -g 100000 cc_conf/boot.rb ${CC_CONF}/boot.rb
|
||||||
install -o 100000 -g 100000 cc_conf/initializers/devise.rb ${CC_CONF}/initializers/devise.rb
|
install -o 100000 -g 100000 cc_conf/initializers/devise.rb ${CC_CONF}/initializers/devise.rb
|
||||||
install -o 100000 -g 100000 cc_conf/environments/production.rb ${CC_CONF}/environments/production.rb
|
install -o 100000 -g 100000 cc_conf/environments/production.rb ${CC_CONF}/environments/production.rb
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
|
Legacy::LegacyOrganization.create!([
|
||||||
|
{activate_by: nil, activated_at: nil, activation_code: nil, address: "", admin_notes: nil, city: "", deprecated: false, email: "", facebook: "", is_active: true, is_admin: true, latitude: nil, longitude: nil, name: "Admin Org", not_an_org: false, only_session_authentication: false, org_verified: true, password: nil, permissions: nil, phone: nil, physical_presence: nil, publish: nil, reputable: nil, state: "", terms_privacy: nil, timestamp_login: nil, timestamp_signup: nil, twitter: "", url: "", voad_referral: nil, work_area: nil, zip_code: "", voad_member: nil, mold_treatment: nil, tree_removal: nil, design: nil, replace_appliances: nil, canvass: nil, sanitizing: nil, exterior_debris: nil, water_pumping: nil, appropriate_work: nil, reconstruction: nil, interior_debris: nil, assessment: nil, muck_out: nil, permission: nil, refurbishing: nil, clean_up: nil, mold_abatement: nil, permits: nil, replace_furniture: nil, gutting: nil, number_volunteers: nil, primary_contact_email: nil, voad_member_url: nil, appengine_key: nil, referral: "", publishable: false, _password_hash_list: nil, does_damage_assessment: false, does_intake_assessment: nil, does_cleanup: false, does_follow_up: false, does_minor_repairs: false, does_rebuilding: false, does_coordination: false, government: false, does_other_activity: false, where_are_you_working: "", accepted_terms: true, accepted_terms_timestamp: "2017-01-01 00:00:00", review_other_organizations: false, situational_awareness: nil, does_recovery: nil, does_only_coordination: nil, does_only_sit_aware: nil, does_something_else: nil},
|
||||||
|
])
|
||||||
User.create!([
|
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}
|
{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: "1.1.1.1", referring_user_id: nil, admin: true, role: nil, mobile: nil, accepted_terms: true, accepted_terms_timestamp: "2017-01-01 00:00:00", title: nil}
|
||||||
])
|
])
|
||||||
quit
|
quit
|
||||||
|
2
lxc-apps/crisiscleanup/install/cc_conf/secrets.yml
Normal file
2
lxc-apps/crisiscleanup/install/cc_conf/secrets.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
production:
|
||||||
|
secret_key_base: ${CRISISCLEANUP_SECRET}
|
Loading…
Reference in New Issue
Block a user