Guest User

Untitled

a guest
Apr 5th, 2018
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. SUBDOMAIN="admin"
  6. PASSWORD="pass1234"
  7. ADMIN_PASSWORD="pass1234"
  8. EMAIL="dev@example.com"
  9.  
  10. echo "--- Create '${SUBDOMAIN}' user"
  11. bundle exec rake cartodb:db:create_user --trace SUBDOMAIN="${SUBDOMAIN}" \
  12. PASSWORD="${PASSWORD}" ADMIN_PASSWORD="${ADMIN_PASSWORD}" \
  13. EMAIL="${EMAIL}"
  14.  
  15. # # Update your quota to 100GB
  16. echo "--- Updating quota to 100GB"
  17. bundle exec rake cartodb:db:set_user_quota["${SUBDOMAIN}",102400]
  18.  
  19. # # Allow unlimited tables to be created
  20. echo "--- Allowing unlimited tables creation"
  21. bundle exec rake cartodb:db:set_unlimited_table_quota["${SUBDOMAIN}"]
  22.  
  23. # # Allow user to create private tables in addition to public
  24. echo "--- Allowing private tables creation"
  25. bundle exec rake cartodb:db:set_user_private_tables_enabled["${SUBDOMAIN}",'true']
  26.  
  27. # # Set the account type
  28. echo "--- Setting cartodb account type"
  29. bundle exec rake cartodb:db:set_user_account_type["${SUBDOMAIN}",'[DEDICATED]']
  30.  
  31.  
  32. psql -U postgres -d carto_db_production -c "update users set builder_enabled = false where username = '${SUBDOMAIN}';"
  33. psql -U postgres -d carto_db_production -c "update users set max_import_file_size = 10000000000 where username = '${SUBDOMAIN}';"
  34. psql -U postgres -d carto_db_production -c "update users set max_import_table_row_count = 100000000 where username = '${SUBDOMAIN}';"
  35. psql -U postgres -d carto_db_production -c "update users set private_maps_enabled = 't' where username = '${SUBDOMAIN}';"
  36. psql -U postgres -d carto_db_production -c "update users set sync_tables_enabled = 't' where username = '${SUBDOMAIN}';"
Add Comment
Please, Sign In to add comment