documentation: further improvements and TESTING!

This commit is contained in:
Michael Brown 2013-06-06 04:58:39 -04:00
parent fa965b5f92
commit e53cd0b083

@ -237,14 +237,19 @@ Initialize the database:
# Run these commands as the discourse user # Run these commands as the discourse user
# The database name here should match the production one in database.yml # The database name here should match the production one in database.yml
createdb discourse_prod createdb discourse_prod
RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production rake db:migrate RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production rake db:migrate
RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production rake assets:precompile RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production rake assets:precompile
## nginx setup ## nginx setup
# Run these commands as your normal login (e.g. "michael") # Run these commands as your normal login (e.g. "michael")
sudo cp ~discourse/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf sudo cp ~discourse/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
Edit /etc/nginx/nginx.conf:
- add: `server_names_hash_bucket_size 64;` to the `http` section
- uncomment: `gzip on;`
Edit /etc/nginx/conf.d/discourse.conf Edit /etc/nginx/conf.d/discourse.conf
- edit `server_name`. Example: `server_name cain.discourse.org test.cain.discourse.org;` - edit `server_name`. Example: `server_name cain.discourse.org test.cain.discourse.org;`
@ -264,7 +269,7 @@ Configure bluepill:
Start Discourse: Start Discourse:
# Run these commands as the discourse user # Run these commands as the discourse user
RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ROOT=~/discourse RAILS_ENV=production NUM_WEBS=4 bluepill --no-privileged -c ~/.bluepill load ~/discourse/config/discourse.pill RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ROOT=~/discourse RAILS_ENV=production NUM_WEBS=4 bluepill --no-privileged -c ~/.bluepill load ~/discourse/config/discourse.pill
Add the bluepill startup to crontab. Add the bluepill startup to crontab.
@ -273,10 +278,22 @@ Add the bluepill startup to crontab.
Add the following line: Add the following line:
@reboot RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ROOT=~/discourse RAILS_ENV=production NUM_WEBS=4 bluepill --no-privileged -c ~/.bluepill load ~/discourse/config/discourse.pill @reboot RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ROOT=~/discourse RAILS_ENV=production NUM_WEBS=4 /home/discourse/.rvm/bin/bootup_bluepill --no-privileged -c ~/.bluepill load ~/discourse/config/discourse.pill
Congratulations! You've got Discourse installed and running! Congratulations! You've got Discourse installed and running!
Now make yourself an administrator account. Browse to your discourse instance
and create an account by logging in normally, then run the commands:
# Run these commands as the discourse user
cd ~/discourse
RAILS_ENV=production bundle exec rails c
# (in rails console)
> me = User.find_by_username_or_email('myemailaddress@me.com')[0]
> me.admin = true
> me.save
## Updating Discourse ## Updating Discourse
# Run these commands as the discourse user # Run these commands as the discourse user
@ -289,6 +306,6 @@ Congratulations! You've got Discourse installed and running!
# To run on the latest version instead of bleeding-edge: # To run on the latest version instead of bleeding-edge:
#git checkout latest-release #git checkout latest-release
bundle install --without test --deployment bundle install --without test --deployment
RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production rake db:migrate RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production rake db:migrate
RUBY_GC_MALLOC_LIMIT=900000000 RAILS_ENV=production rake assets:precompile RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production rake assets:precompile
bluepill start bluepill start