From 0c9c08168c5d279d5a96981fee613787125f7787 Mon Sep 17 00:00:00 2001 From: Johannes Engelke | hybris Date: Fri, 20 Mar 2015 23:01:15 +0100 Subject: [PATCH] Huginn cloudfoudnry compatible --- .cfignore | 1 + .gitignore | 1 + Procfile.CF | 2 ++ config/environments/production.rb | 2 +- manifest.yml.sample | 45 +++++++++++++++++++++++++++++++ 5 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .cfignore create mode 100644 Procfile.CF create mode 100644 manifest.yml.sample diff --git a/.cfignore b/.cfignore new file mode 100644 index 00000000..4c49bd78 --- /dev/null +++ b/.cfignore @@ -0,0 +1 @@ +.env diff --git a/.gitignore b/.gitignore index d769e3a4..e85f3386 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ deployment/cookbooks .*un~ .ruby-gemset .ruby-version +manifest.yml diff --git a/Procfile.CF b/Procfile.CF new file mode 100644 index 00000000..82f9b5ad --- /dev/null +++ b/Procfile.CF @@ -0,0 +1,2 @@ +web: bundle exec rake db:migrate && bundle exec rails server -p $PORT +jobs: bundle exec rails runner bin/threaded.rb diff --git a/config/environments/production.rb b/config/environments/production.rb index b7eca13d..40106e20 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -20,7 +20,7 @@ Huginn::Application.configure do # config.action_dispatch.rack_cache = true # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false + config.serve_static_assets = ENV['SERVE_STATIC_ASSETS'] # Compress JavaScripts and CSS config.assets.js_compressor = :uglifier diff --git a/manifest.yml.sample b/manifest.yml.sample new file mode 100644 index 00000000..91477344 --- /dev/null +++ b/manifest.yml.sample @@ -0,0 +1,45 @@ +--- +applications: +- name: huginn + url: + path: . + memory: 512M + command: nohup foreman start --procfile Procfile.CF + instances: 1 + # For the environment setup please have a look into the .evn.example file + env: + APP_SECRET_TOKEN: "${random-word}${random-word}${random-word}${random-word}${random-word}${random-word}${random-word}${random-word}" + INVITATION_CODE: "try-huginn" + DOMAIN: "" + RAILS_ENV: "production" + SERVE_STATIC_ASSETS: true + FORCE_SSL: "true" + SMTP_DOMAIN: "your-domain-here.com" + SMTP_USER_NAME: "you@gmail.com" + SMTP_PASSWORD: "somepassword" + SMTP_SERVER: "smtp.gmail.com" + SMTP_PORT: 587 + SMTP_AUTHENTICATION: "plain" + SMTP_ENABLE_STARTTLS_AUTO: true + EMAIL_FROM_ADDRESS: "from_address@gmail.com" + AGENT_LOG_LENGTH: 200 + TWITTER_OAUTH_KEY: "" + TWITTER_OAUTH_SECRET: "" + THIRTY_SEVEN_SIGNALS_OAUTH_KEY: "" + THIRTY_SEVEN_SIGNALS_OAUTH_SECRET: "" + GITHUB_OAUTH_KEY: "" + GITHUB_OAUTH_SECRET: "" + TUMBLR_OAUTH_KEY: "" + TUMBLR_OAUTH_SECRET: "" + DROPBOX_OAUTH_KEY: "" + DROPBOX_OAUTH_SECRET: "" + AWS_ACCESS_KEY_ID: "your aws access key id" + AWS_ACCESS_KEY: "your aws access key" + AWS_SANDBOX: false + FARADAY_HTTP_BACKEND: "typhoeus" + DEFAULT_HTTP_USER_AGENT: "Huginn - https://github.com/cantino/huginn" + ALLOW_JSONPATH_EVAL: false + ENABLE_INSECURE_AGENTS: false + ENABLE_SECOND_PRECISION_SCHEDULE: false + FAILED_JOBS_TO_KEEP: 100 + TIMEZONE: "Pacific Time (US & Canada)"