Add geocoder account creation script

This commit is contained in:
Stefan Verhoeven 2017-04-13 19:14:37 +02:00
parent d6832a177f
commit d39252a5c4
2 changed files with 40 additions and 0 deletions

16
geocoder.sh Normal file
View File

@ -0,0 +1,16 @@
rake cartodb:db:create_user --trace SUBDOMAIN="geocoder" \
PASSWORD="pass1234" ADMIN_PASSWORD="pass1234" \
EMAIL="geocoder@example.com"
# # Update your quota to 100GB
echo "--- Updating quota to 100GB"
rake cartodb:db:set_user_quota[geocoder,102400]
# # Allow unlimited tables to be created
echo "--- Allowing unlimited tables creation"
rake cartodb:db:set_unlimited_table_quota[geocoder]
GEOCODER_DB=`echo "SELECT database_name FROM users WHERE username='geocoder'" | psql -U postgres -t carto_db_development`
psql -U postgres $GEOCODER_DB < /cartodb/script/geocoder_server.sql

24
geocoder_server.sql Normal file
View File

@ -0,0 +1,24 @@
create extension cdb_geocoder;
create extension plproxy;
create extension observatory;
create extension cdb_dataservices_server;
create extension cdb_dataservices_client;
SELECT CDB_Conf_SetConf(
'redis_metadata_config',
'{"redis_host": "localhost", "redis_port": 6379, "sentinel_master_id": "", "timeout": 0.1, "redis_db": 5}'
);
SELECT CDB_Conf_SetConf(
'redis_metrics_config',
'{"redis_host": "localhost", "redis_port": 6379, "sentinel_master_id": "", "timeout": 0.1, "redis_db": 5}'
);
SELECT CDB_Conf_SetConf(
'user_config',
'{"is_organization": false, "entity_name": "geocoder"}'
);
SELECT CDB_Conf_SetConf(
'server_conf',
'{"environment": "development"}'
);