From f77d0a5990308ac3b7737fee1a754bf91a0fff11 Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 2 Dec 2019 18:28:46 +0800 Subject: [PATCH] update krakend --- README.md | 1 + krakend/README.md | 10 ++++++++++ krakend/data/krakend.json | 24 ++++++++++++++++++++++++ krakend/docker-compose.yml | 7 +++++++ 4 files changed, 42 insertions(+) create mode 100644 krakend/README.md create mode 100644 krakend/data/krakend.json create mode 100644 krakend/docker-compose.yml diff --git a/README.md b/README.md index 7ce4db4..0185f93 100644 --- a/README.md +++ b/README.md @@ -297,6 +297,7 @@ A collection of delicious docker recipes. - [x] haproxy - [x] jmxtrans/jmxtrans - [x] wurstmeister/kafka +- [x] devopsfaith/krakend - [x] netdata/netdata - [x] nextcloud - [x] sonatype/nexus3 diff --git a/krakend/README.md b/krakend/README.md new file mode 100644 index 0000000..ce3b162 --- /dev/null +++ b/krakend/README.md @@ -0,0 +1,10 @@ +krakend +======= + +[KrakenD][1] 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. + +[1]: https://www.krakend.io/ diff --git a/krakend/data/krakend.json b/krakend/data/krakend.json new file mode 100644 index 0000000..50466e8 --- /dev/null +++ b/krakend/data/krakend.json @@ -0,0 +1,24 @@ +{ + "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" + } + ] + } + ] +} diff --git a/krakend/docker-compose.yml b/krakend/docker-compose.yml new file mode 100644 index 0000000..a948d57 --- /dev/null +++ b/krakend/docker-compose.yml @@ -0,0 +1,7 @@ +krakend: + image: devopsfaith/krakend + ports: + - "8080:8080" + volumes: + - ./data:/etc/krakend + restart: unless-stopped