Created
April 11, 2014 08:00
-
-
Save stevage/10448452 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update && sudo apt-get install -y git-core curl wget screen | |
screen -D -R | |
#<enter> | |
sudo mkdir /mnt/cartodb-dev | |
sudo chown ubuntu:ubuntu /mnt/cartodb-dev | |
cd /mnt | |
# Remove --depth 1 if you're actually doing dev. | |
git clone --depth 1 https://github.com/sshankar/cartodb-dev | |
cd cartodb-dev | |
sudo mkdir -p /usr/local/etc # Not sure if this is created by default. | |
sudo cp config/* /usr/local/etc | |
chmod u+x setup/*.sh | |
sudo bash <<EOF | |
cd /mnt/cartodb-dev; setup/deb-deps.sh | |
cd /mnt/cartodb-dev; setup/fetch-sources.sh | |
cd /mnt/cartodb-dev; setup/postgis-install.sh | |
cd /mnt/cartodb-dev; setup/postgis-setup.sh | |
cd /mnt/cartodb-dev; setup/python-deps.sh | |
cd /mnt/cartodb-dev; setup/node-deps.sh | |
cd /mnt/cartodb-dev; setup/ruby-deps.sh | |
cd /mnt/cartodb-dev; ./setup/cartodb-setup.sh | |
# Error message at the end about no redis job in /etc/init.d, but that's ok. | |
EOF | |
sudo nohup redis-server & | |
cd /usr/local/src/cartodb | |
bundle install | |
export SUBDOMAIN=stevage | |
export USER=$SUBDOMAIN | |
export PASSWORD=egavets | |
export ADMIN_PASSWORD=egavets | |
export EMAIL=stevage@gmail.com | |
echo "127.0.0.1 ${SUBDOMAIN}.localhost.lan" | sudo tee -a /etc/hosts | |
sudo -E bash <<EOF | |
echo creating db | |
bundle exec rake rake:db:create | |
bundle exec rake rake:db:migrate | |
echo creating user ${SUBDOMAIN} | |
bundle exec rake cartodb:db:create_publicuser | |
bundle exec rake cartodb:db:create_user SUBDOMAIN="${SUBDOMAIN}" PASSWORD="${PASSWORD}" EMAIL="${EMAIL}" | |
echo creating schema | |
bundle exec rake cartodb:db:create_schemas | |
bundle exec rake cartodb:db:load_functions | |
bundle exec rake cartodb:db:set_user_quota["${SUBDOMAIN}",10240] | |
if test $? -ne 0; then exit 1; fi | |
bundle exec rake cartodb:db:set_unlimited_table_quota["${SUBDOMAIN}"] | |
if test $? -ne 0; then exit 1; fi | |
bundle exec rake cartodb:db:set_user_private_tables_enabled["${SUBDOMAIN}",'true'] | |
if test $? -ne 0; then exit 1; fi | |
bundle exec rake cartodb:db:set_user_account_type["${SUBDOMAIN}",'[DEDICATED]'] | |
if test $? -ne 0; then exit 1; fi | |
EOF | |
sudo pkill redis | |
sudo bundle exec foreman start -p 3000 | |
# need to open 8080, 8081 | |
# Change /usr/local/src/CartoDB-SQL-API/config/environments/development.js | |
### module.exports.node_host -> '' | |
# /usr/local/src/Windshaft-cartodb/config/environments/development.js | |
#,host: '' | |
#mapnik_version: '2.1.1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment