documentation: merge & adapt suggestions from baus
This commit is contained in:
parent
27c1f1044c
commit
73d6014d10
|
@ -7,7 +7,12 @@ num_webs = ENV["NUM_WEBS"].to_i > 0 ? ENV["NUM_WEBS"].to_i : 4
|
|||
|
||||
# to debug use
|
||||
#Bluepill.application("your_app", :foreground => true) do |app|
|
||||
Bluepill.application("your_app") do |app|
|
||||
|
||||
# Running bluepill as a user? Use:
|
||||
Bluepill.application("discourse", :base_dir => ENV["HOME"] + '/.bluepill') do |app|
|
||||
|
||||
# Running bluepill as root? Use:
|
||||
#Bluepill.application("discourse") do |app|
|
||||
|
||||
app.gid = group
|
||||
app.uid = user
|
||||
|
@ -52,18 +57,18 @@ Bluepill.application("your_app") do |app|
|
|||
end
|
||||
|
||||
#debug instance
|
||||
app.process("thin-debug") do |process|
|
||||
process.start_command = "bundle exec thin start -e development -t 0 -p 10040 -P #{rails_root}/tmp/pids/thin-debug.pid -d"
|
||||
process.pid_file = "#{rails_root}/tmp/pids/thin-debug.pid"
|
||||
process.start_grace_time = 30.seconds
|
||||
process.stop_grace_time = 10.seconds
|
||||
process.restart_grace_time = 10.seconds
|
||||
process.group = "thins"
|
||||
process.uid = user
|
||||
process.gid = group
|
||||
process.daemonize = false
|
||||
process.stdout = process.stderr = "#{rails_root}/log/thin-debug.log"
|
||||
end
|
||||
# app.process("thin-debug") do |process|
|
||||
# process.start_command = "bundle exec thin start -e development -t 0 -p 10040 -P #{rails_root}/tmp/pids/thin-debug.pid -d"
|
||||
# process.pid_file = "#{rails_root}/tmp/pids/thin-debug.pid"
|
||||
# process.start_grace_time = 30.seconds
|
||||
# process.stop_grace_time = 10.seconds
|
||||
# process.restart_grace_time = 10.seconds
|
||||
# process.group = "thins"
|
||||
# process.uid = user
|
||||
# process.gid = group
|
||||
# process.daemonize = false
|
||||
# process.stdout = process.stderr = "#{rails_root}/log/thin-debug.log"
|
||||
# end
|
||||
|
||||
app.process("sidekiq-worker") do |process|
|
||||
pidfile = "#{rails_root}/tmp/pids/sidekiq-worker.pid"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
upstream discourse {
|
||||
server unix:/var/www/discourse/tmp/sockets/thin.0.sock;
|
||||
server unix:/var/www/discourse/tmp/sockets/thin.1.sock;
|
||||
server unix:/var/www/discourse/tmp/sockets/thin.2.sock;
|
||||
server unix:/var/www/discourse/tmp/sockets/thin.3.sock;
|
||||
server unix:/home/discourse/discourse/tmp/sockets/thin.0.sock;
|
||||
server unix:/home/discourse/discourse/tmp/sockets/thin.1.sock;
|
||||
server unix:/home/discourse/discourse/tmp/sockets/thin.2.sock;
|
||||
server unix:/home/discourse/discourse/tmp/sockets/thin.3.sock;
|
||||
}
|
||||
|
||||
server {
|
||||
|
@ -12,14 +12,14 @@ server {
|
|||
gzip_min_length 1000;
|
||||
gzip_types application/json text/css application/x-javascript;
|
||||
|
||||
server_name meta.discourse.org;
|
||||
server_name enter.your.web.hostname.here;
|
||||
|
||||
sendfile on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
location / {
|
||||
root /var/www/discourse/public;
|
||||
root /home/discourse/discourse/public;
|
||||
|
||||
location ~ ^/t\/[0-9]+\/[0-9]+\/avatar {
|
||||
expires 1d;
|
||||
|
|
|
@ -178,7 +178,7 @@ Configure discourse:
|
|||
|
||||
Edit discourse/config/database.yml
|
||||
|
||||
- change production db name to: `discourse_prod`
|
||||
- change production db name if appropriate
|
||||
- change username/password if appropriate
|
||||
- set db_id if using multisite
|
||||
- change `host_names` to the name you'll use to access the discourse site
|
||||
|
@ -189,14 +189,13 @@ Edit discourse/config/redis.yml
|
|||
|
||||
Edit discourse/config/discourse.pill
|
||||
|
||||
- change application name from 'your_app' to however you want to distinguish this ('discourse')
|
||||
- Add option to Bluepill.application: `":base_dir => ENV["HOME"] + '/.bluepill'"`
|
||||
- Should end up looking something like: `Bluepill.application("discourse", :base_dir => ENV["HOME"] + '/.bluepill') do |app|`
|
||||
- comment out debug instance (from `app.process("thin-debug")` through to nearest `end`)
|
||||
- change application name from 'discourse' if necessary
|
||||
- Ensure appropriate Bluepill.application line is uncommented
|
||||
- search for "host to run on" and change to current hostname
|
||||
- note: clockwork should run on only one host
|
||||
|
||||
Edit discourse/config/initializers/secret_token.rb
|
||||
|
||||
- uncomment secret_token line
|
||||
- replace SET_SECRET_HERE with secret output from 'rake secret' command in discourse directory
|
||||
- delete the lines below as per instructions in the file
|
||||
|
@ -220,9 +219,9 @@ Initialize the database:
|
|||
|
||||
Edit /etc/nginx/conf.d/discourse.conf
|
||||
|
||||
- change socket paths to: "unix:/home/discourse/discourse/tmp/sockets/thin.0.sock;"
|
||||
- edit `server_name`. Example: "server_name cain.discourse.org test.cain.discourse.org;"
|
||||
- modify root location to match installed location: "root /home/discourse/discourse/public;"
|
||||
- edit `server_name`. Example: `server_name cain.discourse.org test.cain.discourse.org;`
|
||||
- change socket paths if discourse is installed to a different location
|
||||
- modify root location if discourse is installed to a different location
|
||||
|
||||
## Bluepill setup
|
||||
|
||||
|
|
Loading…
Reference in New Issue