1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-30 02:31:31 +00:00
dockerfiles/krakend
ImgBotApp 1c434b2d2e
[ImgBot] Optimize images
*Total -- 181.18kb -> 152.26kb (15.96%)

/krakend/data/krakend.png -- 32.27kb -> 23.93kb (25.84%)
/node-red/screenshot.png -- 80.86kb -> 61.85kb (23.51%)
/rtmp/server/html/img/cctv.jpg -- 60.20kb -> 58.80kb (2.33%)
/tesseract/data/chinese.jpg -- 7.84kb -> 7.67kb (2.19%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-08-26 02:52:07 +00:00
..
data [ImgBot] Optimize images 2020-08-26 02:52:07 +00:00
docker-compose.yml update krakend 2019-12-02 18:29:02 +08:00
README.md update krakend 2019-12-02 18:49:06 +08:00

krakend

KrakenD is a high-performance open source API Gateway.

Its core functionality is to create an API that acts as an aggregator of many microservices into single endpoints, doing the heavy-lifting automatically for you: aggregate, transform, filter, decode, throttle, auth and more.

krakend config

krakend.json
{
  "version": 2,
  "name": "My httpbin gateway",
  "port": 8080,
  "endpoints": [
    {
      "endpoint": "/httpbin",
      "backend": [
        {
          "host": [
            "https://httpbin.org"
          ],
          "url_pattern": "/headers"
        },
        {
          "host": [
            "https://httpbin.org"
          ],
          "url_pattern": "/ip"
        }
      ]
    }
  ]
}
$ krakend-config2dot -c krakend.json | dot -Tpng -o krakend.png

up and running

$ docker-compose up -d

$ curl http://localhost:8080/httpbin
{
  "headers": {
    "Accept-Encoding": "gzip",
    "Host": "httpbin.org",
    "User-Agent": "KrakenD Version 1.0.0"
  },
  "origin": "172.17.0.1, 1.2.3.4, 172.17.0.1"
}