Give user and organization geocoder quota
Also remove extra space so gecoder is configured correctly in user/org db
This commit is contained in:
parent
79264da25c
commit
685c0f1f80
@ -227,7 +227,8 @@ RUN mkdir -p /cartodb/log && touch /cartodb/log/users_modifications && \
|
||||
service postgresql start && service redis-server start && \
|
||||
bash -l -c "cd /cartodb && bash script/create_dev_user && \
|
||||
bash script/setup_organization.sh && bash script/geocoder.sh" && \
|
||||
service postgresql stop && service redis-server stop
|
||||
service postgresql stop && service redis-server stop && \
|
||||
chmod +x /cartodb/script/fill_geocoder.sh
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# See https://github.com/CartoDB/data-services/issues/228#issuecomment-280037353
|
||||
# Not run during Docker build phase as it would make the image too big
|
||||
cd /data-services/geocoder
|
||||
|
@ -20,10 +20,12 @@ psql -U postgres $GEOCODER_DB < /cartodb/script/geocoder_server.sql
|
||||
USER_DB=`echo "SELECT database_name FROM users WHERE username='dev'" | psql -U postgres -t carto_db_development`
|
||||
echo "CREATE EXTENSION cdb_dataservices_client;" | psql -U postgres $USER_DB
|
||||
echo "SELECT CDB_Conf_SetConf('user_config', '{"'"is_organization"'": false, "'"entity_name"'": "'"dev"'"}');" | psql -U postgres $USER_DB
|
||||
echo -e "SELECT CDB_Conf_SetConf('geocoder_server_config', '{ \"connection_str\": \"host=localhost port=5432 dbname=${GEOCODER_DB} user=postgres\"}');" | psql -U postgres $USER_DB
|
||||
echo -e "SELECT CDB_Conf_SetConf('geocoder_server_config', '{ \"connection_str\": \"host=localhost port=5432 dbname=${GEOCODER_DB# } user=postgres\"}');" | psql -U postgres $USER_DB
|
||||
rake cartodb:services:set_user_quota['dev',geocoding,100000]
|
||||
|
||||
# example organization
|
||||
ORGANIZATION_DB=`echo "SELECT database_name FROM users WHERE username='admin4example'" | psql -A -U postgres -t carto_db_development`
|
||||
echo "CREATE EXTENSION cdb_dataservices_client;" | psql -U postgres $ORGANIZATION_DB
|
||||
echo "SELECT CDB_Conf_SetConf('user_config', '{"'"is_organization"'": true, "'"entity_name"'": "'"example"'"}');" | psql -U postgres $ORGANIZATION_DB
|
||||
echo -e "SELECT CDB_Conf_SetConf('geocoder_server_config', '{ \"connection_str\": \"host=localhost port=5432 dbname=${GEOCODER_DB} user=postgres\"}');" | psql -U postgres $ORGANIZATION_DB
|
||||
echo -e "SELECT CDB_Conf_SetConf('geocoder_server_config', '{ \"connection_str\": \"host=localhost port=5432 dbname=${GEOCODER_DB# } user=postgres\"}');" | psql -U postgres $ORGANIZATION_DB
|
||||
rake cartodb:services:set_org_quota['example',geocoding,100000]
|
||||
|
Loading…
Reference in New Issue
Block a user