From f92a89b3107ce651b01aa7fb2ac09f6641c28198 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 12 Jun 2018 20:26:52 +0200 Subject: [PATCH] website: fix proxies to work via copy/paste --- website/source/docs/connect/proxies.html.md | 62 ++++++++++++--------- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/website/source/docs/connect/proxies.html.md b/website/source/docs/connect/proxies.html.md index deb36a9eac..b25291dfc4 100644 --- a/website/source/docs/connect/proxies.html.md +++ b/website/source/docs/connect/proxies.html.md @@ -63,8 +63,11 @@ default managed proxy and starts a listener for that service: ```json { - "service": "redis", - "connect": { "proxy": {} } + "service": { + "name": "redis", + "port": 6379, + "connect": { "proxy": {} } + } } ``` @@ -85,14 +88,17 @@ proxy configuration: ```json { - "service": "web", - "connect": { - "proxy": { - "config": { - "upstreams": [{ - "destination_name": "redis", - "local_bind_port": 1234 - }] + "service": { + "name": "web", + "port": 8080, + "connect": { + "proxy": { + "config": { + "upstreams": [{ + "destination_name": "redis", + "local_bind_port": 1234 + }] + } } } } @@ -125,15 +131,18 @@ service. ```json { - "service": "web", - "connect": { - "proxy": { - "config": { - "upstreams": [{ - "destination_name": "nearest-redis", - "destination_type": "prepared_query", - "local_bind_port": 1234 - }] + "service": { + "name": "web", + "port": 8080, + "connect": { + "proxy": { + "config": { + "upstreams": [{ + "destination_name": "redis", + "destination_type": "prepared_query", + "local_bind_port": 1234 + }] + } } } } @@ -160,13 +169,16 @@ can be used. configured to run as a managed proxy. To configure custom proxies, specify an alternate command to execute for the proxy: -``` +```json { - "service": "web", - "connect": { - "proxy": { - "exec_mode": "daemon", - "command": ["/usr/bin/my-proxy", "-flag-example"] + "service": { + "name": "web", + "port": 8080, + "connect": { + "proxy": { + "exec_mode": "daemon", + "command": ["/usr/bin/my-proxy", "-flag-example"] + } } } }