From 0f1d69ebe44b978e4a4763b35c91c2d84b39ae6e Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Fri, 22 Jun 2018 11:23:20 +0200 Subject: [PATCH] Regenerate api keys during startup --- startup.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/startup.sh b/startup.sh index c49bed3..daa0fa5 100755 --- a/startup.sh +++ b/startup.sh @@ -20,4 +20,10 @@ source /usr/local/rvm/scripts/rvm bundle exec script/restore_redis bundle exec script/resque > resque.log 2>&1 & script/sync_tables_trigger.sh & + +# Recreate api keys in db and redis, so sql api is authenticated +echo 'delete from api_keys' | psql -U postgres -t carto_db_development +bundle exec rake carto:api_key:create_default + +# bundle exec rake carto:api_key:create_default bundle exec thin start --threaded -p 3000 --threadpool-size 5