2014-11-15 23:32:19 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-06-22 17:22:59 +08:00
|
|
|
export CARTO_HOSTNAME=${CARTO_HOSTNAME:=$HOSTNAME}
|
2018-06-22 16:27:27 +08:00
|
|
|
|
|
|
|
perl -pi -e 's/cartodb\.localhost/$ENV{"CARTO_HOSTNAME"}/g' /etc/nginx/sites-enabled/default /cartodb/config/app_config.yml /Windshaft-cartodb/config/environments/development.js
|
2017-04-07 02:02:07 +08:00
|
|
|
|
2014-11-15 23:32:19 +08:00
|
|
|
service postgresql start
|
|
|
|
service redis-server start
|
2017-04-04 04:46:52 +08:00
|
|
|
/opt/varnish/sbin/varnishd -a :6081 -T localhost:6082 -s malloc,256m -f /etc/varnish.vcl
|
|
|
|
service nginx start
|
2014-11-15 23:32:19 +08:00
|
|
|
|
|
|
|
cd /Windshaft-cartodb
|
|
|
|
node app.js development &
|
|
|
|
|
|
|
|
cd /CartoDB-SQL-API
|
|
|
|
node app.js development &
|
|
|
|
|
|
|
|
cd /cartodb
|
2015-02-13 21:59:26 +08:00
|
|
|
source /usr/local/rvm/scripts/rvm
|
|
|
|
bundle exec script/restore_redis
|
2015-05-16 19:01:49 +08:00
|
|
|
bundle exec script/resque > resque.log 2>&1 &
|
2017-08-02 04:07:30 +08:00
|
|
|
script/sync_tables_trigger.sh &
|
2018-06-22 17:23:20 +08:00
|
|
|
|
|
|
|
# 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
|
2017-04-04 04:46:52 +08:00
|
|
|
bundle exec thin start --threaded -p 3000 --threadpool-size 5
|