Skip to content

Commit 99b899b

Browse files
committed
updated README
1 parent 91b6905 commit 99b899b

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,19 @@ The current project is considered production ready.
2020
Quick start
2121
===========
2222

23+
## Standalone
24+
25+
```bash
26+
$ docker run --name="apigateway" \
27+
-p 80:80 \
28+
-e "LOG_LEVEL=info" \
29+
adobeapiplatform/apigateway:latest
2330
```
24-
docker run --name="apigateway" \
31+
32+
## With Apache Mesos
33+
34+
```bash
35+
$ docker run --name="apigateway" \
2536
-p 80:80 \
2637
-e "MARATHON_HOST=http://<marathon_host>:<port>" \
2738
-e "LOG_LEVEL=info" \
@@ -67,7 +78,7 @@ docker run --name="apigateway" \
6778
```
6879

6980
`s3://api-gateway-config-bucket` should contain something similar to what's in the [api-gateway-config](https://github.com/adobe-apiplatform/apigateway/blob/master/api-gateway-config/) folder.
70-
For any customizations it would be good to start from there.
81+
For any customization it would be good to start from there.
7182
There are only 2 files that won't be synchronised:
7283
* `/etc/api-gateway/conf.d/includes/resolvers.conf` . Read bellow for more info
7384
* `https://github.com/adobe-apiplatform/apigateway/blob/master/api-gateway-config/environment.conf.d/api-gateway-upstreams.http.conf` which is automatically generated by the Marathon Discovery script.
@@ -83,12 +94,16 @@ docker run --name="apigateway" \
8394
-e "LOG_LEVEL=info" \
8495
adobeapiplatform/apigateway:latest
8596
```
86-
By default the remote config is checked for changes every `10s` and it's configurable through the `REMOTE_CONFIG_SYNC_INTERVAL` env variable.
97+
By default the remote config is checked for changes every `10s`. This interval is configurable through the `REMOTE_CONFIG_SYNC_INTERVAL` env variable.
8798
There are a few things to take into consideration when changing this value:
8899
* How often the configs really change
89100
* Cost. Some tools may make 1 API request per file to compare it. I.e. in S3 72 config files checked every `10s` costs `$7.46` but when checked every `30s` it's only `$2.4`, times number of GW nodes.
90101
* Average time for an API Request. When reloading the GW the existing NGINX processes handling active connections are kept in the background until the request completes. So reloading the Gateway too fast may have the side effect of keeping too many processes running at the same time. This may, or may not be a problem but it's good to be aware of it.
91102

103+
#### Customizing the sync command
104+
105+
The sync command used for downloading the configuration files can be controlled via `REMOTE_CONFIG_SYNC_CMD` as well. This ENV VAR overrides the `REMOTE_CONFIG` one.
106+
92107
#### Resolvers
93108
While starting up this container automatically creates the `/etc/api-gateway/conf.d/includes/resolvers.conf` config file using `/etc/resolv.conf` as the source.
94109
To learn more about the `resolver` directive in NGINX see the [docs](http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver).
@@ -102,8 +117,8 @@ What's inside
102117

103118
| Module | Version | Details |
104119
|--------------|------------|--------------|
105-
| [Openresty](https://github.com/openresty/) | 1.9.7.3 | Installed in `/usr/local/sbin/api-gateway` |
106-
| [Openresty](https://github.com/openresty/) compiled `--with-debug` | 1.9.7.3 | Installed in `/usr/local/sbin/api-gateway-debug` which enables [debugging log](http://nginx.org/en/docs/debugging_log.html) |
120+
| [Openresty](https://github.com/openresty/) | 1.13.6.1 | Installed in `/usr/local/sbin/api-gateway` |
121+
| [Openresty](https://github.com/openresty/) compiled `--with-debug` | 1.13.6.1 | Installed in `/usr/local/sbin/api-gateway-debug` which enables [debugging log](http://nginx.org/en/docs/debugging_log.html) |
107122
| [Test Nginx](https://github.com/openresty/test-nginx) | [0.24](https://github.com/openresty/test-nginx/releases/tag/v0.24) | Useful for executing integration tests from the container. <br/> It's installed in `/usr/local/test-nginx-0.24/`. <br/> It's also used during Docker build to execute `make test` on lua modules. |
108123
| [PCRE](https://sourceforge.net/projects/pcre/) | [8.37](https://sourceforge.net/projects/pcre/files/pcre/8.37/) | Enables PCRE JIT support |
109124
| [ZeroMQ](http://download.zeromq.org/) | [4.0.5](http://zeromq.org/area:download) | ZeroMQ |

0 commit comments

Comments
 (0)