mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-16 03:41:41 +00:00
Updated to work with the current rails41 branch
This commit is contained in:
parent
8dee404403
commit
76eb880828
6 changed files with 17 additions and 26 deletions
4
Gemfile
4
Gemfile
|
@ -63,7 +63,3 @@ group :development, :test do
|
|||
gem 'webmock', require: false
|
||||
gem 'coveralls', require: false
|
||||
end
|
||||
|
||||
group :production do
|
||||
gem 'unicorn'
|
||||
end
|
||||
|
|
|
@ -142,7 +142,6 @@ GEM
|
|||
kaminari (0.14.1)
|
||||
actionpack (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
kgio (2.9.2)
|
||||
kramdown (1.1.0)
|
||||
libv8 (3.16.14.3)
|
||||
macaddr (1.7.1)
|
||||
|
@ -196,7 +195,6 @@ GEM
|
|||
rake (>= 0.8.7)
|
||||
rdoc (~> 3.4)
|
||||
thor (>= 0.14.6, < 2.0)
|
||||
raindrops (0.13.0)
|
||||
rake (10.2.2)
|
||||
rdoc (3.12.2)
|
||||
json (~> 1.4)
|
||||
|
@ -285,10 +283,6 @@ GEM
|
|||
uglifier (2.5.0)
|
||||
execjs (>= 0.3.0)
|
||||
json (>= 1.8.0)
|
||||
unicorn (4.8.2)
|
||||
kgio (~> 2.6)
|
||||
rack
|
||||
raindrops (~> 0.7)
|
||||
uuid (2.3.7)
|
||||
macaddr (~> 1.0)
|
||||
warden (1.2.3)
|
||||
|
@ -351,7 +345,6 @@ DEPENDENCIES
|
|||
twitter-stream!
|
||||
typhoeus (~> 0.6.3)
|
||||
uglifier (>= 1.0.3)
|
||||
unicorn
|
||||
webmock
|
||||
weibo_2 (~> 0.1.4)
|
||||
wunderground (~> 1.1.0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
web: sudo bundle exec unicorn_rails -c config/unicorn.rb
|
||||
schedule: sudo bundle exec rails runner bin/schedule.rb
|
||||
twitter: sudo bundle exec rails runner bin/twitter_stream.rb
|
||||
dj: sudo bundle exec script/delayed_job run
|
||||
web: sudo bundle exec unicorn_rails -c config/unicorn.rb -E production
|
||||
schedule: sudo RAILS_ENV=production bundle exec rails runner bin/schedule.rb
|
||||
twitter: sudo RAILS_ENV=production bundle exec rails runner bin/twitter_stream.rb
|
||||
dj: sudo RAILS_ENV=production bundle exec script/delayed_job run
|
||||
|
|
|
@ -23,6 +23,7 @@ DATABASE_PASSWORD=password
|
|||
|
||||
# Configure Rails environment. This should only be needed in production and may cause errors in development.
|
||||
RAILS_ENV=production
|
||||
FORCE_SSL=false
|
||||
|
||||
# Outgoing email settings. To use Gmail or Google Apps, put your Google Apps domain or gmail.com
|
||||
# as the SMTP_DOMAIN and your Gmail username and password as the SMTP_USER_NAME and SMTP_PASSWORD.
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
#worker_process 2;
|
||||
user huginn huginn;
|
||||
|
||||
events {
|
||||
events {
|
||||
worker_connections 1024;
|
||||
accept_mutex on;
|
||||
}
|
||||
|
||||
http {
|
||||
types_hash_max_size 2048;
|
||||
include mime.types;
|
||||
|
||||
upstream huginn_server {
|
||||
server unix:/home/huginn/shared/tmp/sockets/unicorn.sock;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
@ -23,13 +26,9 @@ http {
|
|||
}
|
||||
location @app {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
proxy_set_header Host $http_host;
|
||||
|
||||
proxy_redirect off;
|
||||
|
||||
proxy_pass http://huginn_server;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ group "huginn" do
|
|||
members ["huginn"]
|
||||
end
|
||||
|
||||
%w("ruby1.9.1" "ruby1.9.1-dev" "libxslt-dev" "libxml2-dev" "curl" "libshadow-ruby1.8" "libmysqlclient-dev" "libffi-dev", "libssl-dev").each do |pkg|
|
||||
%w("ruby1.9.1" "ruby1.9.1-dev" "libxslt-dev" "libxml2-dev" "curl" "libshadow-ruby1.8" "libmysqlclient-dev" "libffi-dev" "libssl-dev").each do |pkg|
|
||||
package("#{pkg}")
|
||||
end
|
||||
|
||||
|
@ -36,6 +36,7 @@ end
|
|||
|
||||
deploy "/home/huginn" do
|
||||
repo "https://github.com/cantino/huginn.git"
|
||||
branch "master"
|
||||
user "huginn"
|
||||
group "huginn"
|
||||
environment "RAILS_ENV" => "production"
|
||||
|
@ -81,12 +82,13 @@ deploy "/home/huginn" do
|
|||
ln -nfs /home/huginn/shared/config/.env ./.env
|
||||
ln -nfs /home/huginn/shared/config/unicorn.rb ./config/unicorn.rb
|
||||
sudo cp /home/huginn/shared/config/nginx.conf /etc/nginx/
|
||||
echo 'gem "unicorn", :group => :production' >> Gemfile
|
||||
sudo bundle install --without=development --without=test
|
||||
sed -i s/REPLACE_ME_NOW\!/$(sudo bundle exec rake secret)/ .env
|
||||
sed -i s/config\.force_ssl\ \=\ true/config\.force_ssl\ \=\ false/ config/environments/production.rb
|
||||
sudo bundle exec rake db:create
|
||||
sudo bundle exec rake db:migrate
|
||||
sudo bundle exec rake db:seed
|
||||
sudo RAILS_ENV=production bundle exec rake db:create
|
||||
sudo RAILS_ENV=production bundle exec rake db:migrate
|
||||
sudo RAILS_ENV=production bundle exec rake db:seed
|
||||
sudo RAILS_ENV=production bundle exec rake assets:precompile
|
||||
sudo foreman export upstart /etc/init -a huginn -u huginn -l log
|
||||
sudo start huginn
|
||||
EOH
|
||||
|
|
Loading…
Add table
Reference in a new issue