Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Default config files for a production installation

  • Loading branch information...
commit 0d4dcfa24c52701e05962fda62761d382fea99bf 1 parent 8248a38
@dmac dmac authored
View
42 config/system_setup_files/nginx_site.prod.conf
@@ -0,0 +1,42 @@
+# This file may be used as an example when installing barkeep on a server.
+# It will be overwritten at deploy time.
+#
+# This file gets placed into /etc/nginx/sites-enabled/barkeep
+# Modified from Unicorn's sample nginx configuration.
+
+# Cache static assets in nginx (on disk). 100MB of cache; expires after 1 hour.
+proxy_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=assets:100m inactive=60m;
+proxy_temp_path /var/lib/nginx/proxy 1 2;
+
+server {
+ listen 80 default deferred;
+
+ client_max_body_size 4G;
+ server_name barkeep_vagrant localhost;
+ # ~2 seconds is often enough for most folks to parse HTML/CSS and
+ # retrieve needed images/icons/frames, connections are cheap in
+ # nginx so increasing this is generally safe...
+ keepalive_timeout 5;
+
+ location / {
+ # an HTTP header important enough to have its own Wikipedia entry:
+ # http://en.wikipedia.org/wiki/X-Forwarded-For
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+
+ # pass the Host: header from the client right along so redirects
+ # can be set properly within the Rack application
+ proxy_set_header Host $http_host;
+
+ # we don't want nginx trying to do something clever with
+ # redirects, we set the Host: header above already.
+ proxy_redirect off;
+
+ proxy_pass http://localhost:8040;
+ }
+
+ # Cache assets served by Pinion from /assets
+ location /assets {
+ proxy_cache assets;
+ proxy_pass http://localhost:8040;
+ }
+}
View
20 environment.prod.rb
@@ -0,0 +1,20 @@
+DB_HOST = "localhost"
+DB_PORT = 3306
+DB_NAME = "barkeep"
+DB_USER = "root"
+DB_PASSWORD = ""
+REDIS_HOST = "localhost"
+REDIS_PORT = 6379
+OPENID_PROVIDERS = "https://www.google.com/accounts/o8/ud"
+BARKEEP_HOSTNAME = "barkeep_vagrant"
+REPOS_ROOT = "barkeep_repos"
+UNICORN_PID_FILE = "/tmp/barkeep-unicorn.pid"
+UNICORN_SOCKET = "/tmp/barkeep-unicorn.sock"
+UNICORN_WORKERS = 4
+RESQUE_WORKERS = 4
+RACK_ENV = "production"
+GMAIL_ADDRESS = "use_your_own_account@gmail.com"
+GMAIL_PASSWORD = "password!"
+COOKIE_SESSION_SECRET = "This should be a long, random, secret string."
+REDIS_DB = 0
+REDIS_DB_FOR_RESQUE = 1
View
20 environment.prod.sh
@@ -0,0 +1,20 @@
+export DB_HOST="localhost"
+export DB_PORT="3306"
+export DB_NAME="barkeep"
+export DB_USER="root"
+export DB_PASSWORD=""
+export REDIS_HOST="localhost"
+export REDIS_PORT="6379"
+export OPENID_PROVIDERS="https://www.google.com/accounts/o8/ud"
+export BARKEEP_HOSTNAME="barkeep_vagrant"
+export REPOS_ROOT="barkeep_repos"
+export UNICORN_PID_FILE="/tmp/barkeep-unicorn.pid"
+export UNICORN_SOCKET="/tmp/barkeep-unicorn.sock"
+export UNICORN_WORKERS="4"
+export RESQUE_WORKERS="4"
+export RACK_ENV="production"
+export GMAIL_ADDRESS="use_your_own_account@gmail.com"
+export GMAIL_PASSWORD="password!"
+export COOKIE_SESSION_SECRET="This should be a long, random, secret string."
+export REDIS_DB="0"
+export REDIS_DB_FOR_RESQUE="1"
Please sign in to comment.
Something went wrong with that request. Please try again.