Last active
October 24, 2016 19:48
-
-
Save davidheyman/ab2e85b012938a58a32e71af86ab29fd 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 upgrade | |
sudo apt-get install -y postgis postgresql-9.3-postgis-2.1 imagemagick | |
cd ~rails | |
git clone https://github.com/axismaps/cognita.git | |
cp ~rails/rails_project/config/database.yml ~rails/cognita/config/ | |
vim cognita/config/database.yml | |
# Change the adapter to 'postgis' | |
# Change all instances of 'rails_project' to 'cognita' | |
cd cognita | |
bundle install | |
. /etc/default/unicorn | |
sudo su postgres | |
psql | |
# In psql prompt | |
ALTER USER rails WITH SUPERUSER; | |
\q | |
exit | |
RAILS_ENV=production rake db:create | |
RAILS_ENV=production rake db:migrate | |
RAILS_ENV=production rake db:seed | |
RAILS_ENV=production rake assets:precompile | |
nano /etc/unicorn.conf | |
# Change working_directory to point to cognita | |
vim /etc/default/unicorn | |
# Change APP_ROOT to point to cognita | |
service unicorn restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment