Skip to content

Instantly share code, notes, and snippets.

@sud0n1m
Last active December 13, 2015 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sud0n1m/4964336 to your computer and use it in GitHub Desktop.
Save sud0n1m/4964336 to your computer and use it in GitHub Desktop.
# From the Discourse-Chef directory
SERVER="yourdomain.com"
# Install Instructions
librarian-chef install
# enter your password once and never again
ssh-copy-id root@$SERVER
# Copy the bootstrap file and run it
rsync -r . root@$SERVER:/var/chef && ssh root@$SERVER "sh /var/chef/bootstrap.sh"
# Install chef services
librarian-chef install && rsync -r . root@$SERVER:/var/chef && ssh root@$SERVER "chef-solo -c /var/chef/solo.rb"
# Copy the deploy user to the server
ssh-copy-id deploy@$SERVER
# From the discourse directory
cap deploy
# Fix some stuff that's still not automated
ssh deploy@$SERVER
sudo su postgres
psql -d discourse
CREATE EXTENSION hstore;
\q
exit
cd /web/discourse/current
bundle exec rake db:migrate
# Log in and create your first user!
# Then go and make them an admin
ssh deploy@$SERVER1
cd /web/discourse/current
bundle exec rails c
u = User.first
u.admin = true
u.save
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment