Skip to content

Instantly share code, notes, and snippets.

@kryachkov
Last active March 10, 2016 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kryachkov/0c7062d053e3951422b1 to your computer and use it in GitHub Desktop.
Save kryachkov/0c7062d053e3951422b1 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
</head>
<body>
<h1>Hello from app node</h1>
</body>
</html>
server {
listen 80 default_server;
root /usr/share/nginx/html;
index index.html index.htm;
server_name localhost;
location / {
proxy_pass http://192.168.33.12:80/;
}
}
description "Serf agent"
start on runlevel [2345]
stop on runlevel [!2345]
exec /usr/local/bin/serf agent -bind=192.168.33.12 -node=app >> /var/log/serf.log 2>&1
description "Serf agent"
start on runlevel [2345]
stop on runlevel [!2345]
exec /usr/local/bin/serf agent -bind=192.168.33.11 -node=db >> /var/log/serf.log 2>&1
description "Serf agent"
start on runlevel [2345]
stop on runlevel [!2345]
exec /usr/local/bin/serf agent -bind=192.168.33.10 -node=lb >> /var/log/serf.log 2>&1
description "Join the serf cluster"
start on runlevel [2345]
stop on runlevel [!2345]
task
respawn
script
sleep 5
exec /usr/local/bin/serf join 192.168.33.10
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment