Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- set -e
- SUBDOMAIN="admin"
- PASSWORD="pass1234"
- ADMIN_PASSWORD="pass1234"
- EMAIL="dev@example.com"
- echo "--- Create '${SUBDOMAIN}' user"
- bundle exec rake cartodb:db:create_user --trace SUBDOMAIN="${SUBDOMAIN}" \
- PASSWORD="${PASSWORD}" ADMIN_PASSWORD="${ADMIN_PASSWORD}" \
- EMAIL="${EMAIL}"
- # # Update your quota to 100GB
- echo "--- Updating quota to 100GB"
- bundle exec rake cartodb:db:set_user_quota["${SUBDOMAIN}",102400]
- # # Allow unlimited tables to be created
- echo "--- Allowing unlimited tables creation"
- bundle exec rake cartodb:db:set_unlimited_table_quota["${SUBDOMAIN}"]
- # # Allow user to create private tables in addition to public
- echo "--- Allowing private tables creation"
- bundle exec rake cartodb:db:set_user_private_tables_enabled["${SUBDOMAIN}",'true']
- # # Set the account type
- echo "--- Setting cartodb account type"
- bundle exec rake cartodb:db:set_user_account_type["${SUBDOMAIN}",'[DEDICATED]']
- psql -U postgres -d carto_db_production -c "update users set builder_enabled = false where username = '${SUBDOMAIN}';"
- psql -U postgres -d carto_db_production -c "update users set max_import_file_size = 10000000000 where username = '${SUBDOMAIN}';"
- psql -U postgres -d carto_db_production -c "update users set max_import_table_row_count = 100000000 where username = '${SUBDOMAIN}';"
- psql -U postgres -d carto_db_production -c "update users set private_maps_enabled = 't' where username = '${SUBDOMAIN}';"
- 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