Skip to content

Commit

Permalink
Add geocoder account creation script
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Apr 13, 2017
1 parent d6832a1 commit d39252a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
16 changes: 16 additions & 0 deletions geocoder.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

rake cartodb:db:create_user --trace SUBDOMAIN="geocoder" \
PASSWORD="pass1234" ADMIN_PASSWORD="pass1234" \
EMAIL="[email protected]"

# # 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 changes: 24 additions & 0 deletions geocoder_server.sql
Original file line number Diff line number Diff line change
@@ -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"}'
);

0 comments on commit d39252a

Please sign in to comment.