-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add getting started to readme and examples [ci skip]
- Loading branch information
Showing
3 changed files
with
110 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"marthon_urls": [ "http://marathon-host-1:8080"], | ||
"username": "", | ||
"password": "", | ||
"filter_regex": "", | ||
"port": 7777, | ||
"template": "/etc/nginx/nginx.template", | ||
"nginx_config": "/etc/nginx/nginx.conf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
user nginx; | ||
worker_processes 1; | ||
|
||
error_log /var/log/nginx/error.log warn; | ||
pid /var/run/nginx.pid; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /dev/stdout main; | ||
sendfile on; | ||
keepalive_timeout 65; | ||
|
||
## Dynamic App Upstreams ## | ||
|
||
{{#if my-app}} | ||
upstream my-app { | ||
{{#each apps-homes-search.Tasks}} | ||
server {{this.Host}}:{{this.Ports[0]}}; | ||
{{/each}} | ||
} | ||
{{/if}} | ||
|
||
server { | ||
listen 80; | ||
|
||
## Dynamic App Routes ## | ||
|
||
{{#if my-app}} | ||
location /my/path { | ||
proxy_pass http://my-app; | ||
} | ||
|
||
location /my/path2 { | ||
proxy_pass http://my-app; | ||
} | ||
{{/if}} | ||
|
||
# optional: health endpoint for Marathon | ||
location /_health { | ||
access_log off; | ||
return 200 'A-OK!'; | ||
add_header Content-Type text/plain; | ||
} | ||
|
||
# optional: expose RESTful API for Beethoven | ||
location /_bt { | ||
proxy_pass http://127.0.0.1:7777/; | ||
} | ||
} | ||
} |