website: fix proxies to work via copy/paste

This commit is contained in:
Mitchell Hashimoto 2018-06-12 20:26:52 +02:00 committed by Jack Pearkes
parent 6a438c25d0
commit f92a89b310

View File

@ -63,8 +63,11 @@ default managed proxy and starts a listener for that service:
```json ```json
{ {
"service": "redis", "service": {
"connect": { "proxy": {} } "name": "redis",
"port": 6379,
"connect": { "proxy": {} }
}
} }
``` ```
@ -85,14 +88,17 @@ proxy configuration:
```json ```json
{ {
"service": "web", "service": {
"connect": { "name": "web",
"proxy": { "port": 8080,
"config": { "connect": {
"upstreams": [{ "proxy": {
"destination_name": "redis", "config": {
"local_bind_port": 1234 "upstreams": [{
}] "destination_name": "redis",
"local_bind_port": 1234
}]
}
} }
} }
} }
@ -125,15 +131,18 @@ service.
```json ```json
{ {
"service": "web", "service": {
"connect": { "name": "web",
"proxy": { "port": 8080,
"config": { "connect": {
"upstreams": [{ "proxy": {
"destination_name": "nearest-redis", "config": {
"destination_type": "prepared_query", "upstreams": [{
"local_bind_port": 1234 "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 configured to run as a managed proxy. To configure custom proxies, specify
an alternate command to execute for the proxy: an alternate command to execute for the proxy:
``` ```json
{ {
"service": "web", "service": {
"connect": { "name": "web",
"proxy": { "port": 8080,
"exec_mode": "daemon", "connect": {
"command": ["/usr/bin/my-proxy", "-flag-example"] "proxy": {
"exec_mode": "daemon",
"command": ["/usr/bin/my-proxy", "-flag-example"]
}
} }
} }
} }