Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/discourse/files/init-discourse

Issue 9377123: Set up proper FastCGI environment for Discourse and use nginx (Closed)
Patch Set: Created Feb. 15, 2013, 9:29 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 scm_url="https://hg.adblockplus.org/discourse"
4 tmp_dir="/tmp/discourse-$$"
5 config_dir="/etc/discourse"
6 app_dir="/opt/discourse" 3 app_dir="/opt/discourse"
7 4
8 hg clone "$scm_url" "$tmp_dir" 5 sudo bundle install --gemfile=$app_dir/Gemfile
9 ln -s "$config_dir/database.yml" "$tmp_dir/config/database.yml" 6
10 ln -s "$config_dir/redis.yml" "$tmp_dir/config/redis.yml" 7 pushd $app_dir
11 pushd "$tmp_dir" 8
9 export GEM_HOME=~discourse/.gems
12 bundle install 10 bundle install
11
13 rake assets:precompile RAILS_ENV="production" 12 rake assets:precompile RAILS_ENV="production"
13
14 [[ -f /etc/init.d/spawn-fcgi ]] && sudo /etc/init.d/spawn-fcgi stop
15
16 rake db:migrate RAILS_ENV="production"
17
18 [[ -f /etc/init.d/spawn-fcgi ]] && sudo /etc/init.d/spawn-fcgi start
19
14 popd 20 popd
15
16 # TODO: Stop Thin
17
18 [[ -d $app_dir ]] && rm -rf "$app_dir"
19 mv "$tmp_dir" "$app_dir"
20
21 pushd "$app_dir"
22 rake db:migrate RAILS_ENV="production"
23 popd
24
25 # TODO: Start Thin
OLDNEW
« no previous file with comments | « modules/discourse/files/discourse.fcgi ('k') | modules/discourse/files/intraforum.adblockplus.org » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld