Install Chef (chef-client, chef-solo, knife)
curl -L https://www.opscode.com/chef/install.sh | sudo bash
Use knife-solo
Use Berkshelf
- generate application cookbook using Berkshelf
module.exports = function(grunt) { | |
grunt.initConfig({ | |
dosmth: { | |
before: 'logging', | |
after: 'exiting' | |
}, | |
bower: { | |
install: { } | |
} |
package controllers | |
import play.api.mvc._ | |
import play.api.mvc.Results._ | |
object Application extends Controller { | |
def untrail(path: String) = Action { | |
MovedPermanently("/" + path) | |
} |
Install Chef (chef-client, chef-solo, knife)
curl -L https://www.opscode.com/chef/install.sh | sudo bash
Use knife-solo
Use Berkshelf
sudo apt-get update && time sudo apt-get dist-upgrade # http://askubuntu.com/questions/194651/why-use-apt-get-upgrade-instead-of-apt-get-dist-upgrade | |
# fix locale issues | |
# http://codetheory.in/fixing-locale-warnings-notices-issues-on-linux-server-or-desktop/ | |
# http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue | |
sudo vim /etc/environment | |
# and put the following variables into it | |
> LC_ALL=en_US.UTF-8 | |
> LANG=en_US.UTF-8 |
import sbtrelease._ | |
import ReleaseStateTransformations._ | |
name := "exit-code" | |
scalaVersion := "2.10.4" | |
releaseSettings | |
ReleaseKeys.releaseProcess := Seq[ReleaseStep]( |
// This is correct way to define a resolver for Maven style repository. | |
resolvers += "version99" at "http://version99.qos.ch/" |
import sbt.Keys._ | |
import sbt._ | |
object ApplicationBuild extends Build { | |
val unifiedLogging = Seq( | |
"commons-logging" % "commons-logging" % "99-empty", | |
"log4j" % "log4j" % "99-empty", | |
"org.slf4j" % "log4j-over-slf4j" % "1.7.9", |
location / { | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_pass http://localhost:9000; | |
} |
server { | |
listen 80 default; | |
server_name your_server.org; | |
location / { | |
proxy_http_version 1.1; # this is essential for chunked responses to work | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |