8000 GitHub - hazzadous/docker-kong-dev: An unofficial Docker image (tooling) for Kong testing, and development.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

hazzadous/docker-kong-dev

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-kong-dev

A work in progress. Use at your own discretion. A basic understanding of Docker, Compose, and Kong is required.

An unofficial Docker image (tooling) for Kong testing, and development.

Kong is a scalable, open source API Layer (also known as an API Gateway, or API Middleware)... Backed by the battle-tested NGINX with a focus on high performance.

This repository provides lightweight tooling for testing, and developing Kong. It is intended to serve as an unofficial, easy-to-use, alternative to kong-vagrant< 5E7A /a> for developing on Kong or on custom plugins. Some manual labour however, is still required (e.g. Mounting directories, setting environment variables / flags, etc).

The mrsaints/kong-dev image contains all the necessary dependencies to run, test, and develop Kong (e.g. OpenResty, luarocks, Serf, and Kong). It is a fork of openresty/openresty:alpine-fat.

Getting Started

To get started, clone this repository, and modify the docker-compose.yml file if you would like to mount your local Kong repository or your custom plugin source code. Alternatively, you can clone the Mashape/kong-plugin boilerplate into this directory to begin working on your custom plugin. The Mashape/kong repository can also be cloned into this directory.

Once ready, run docker-compose run --rm --service-ports kong bash, and you can begin running commands like kong start -v. The database might take a while to start up. There is no entrypoint for Kong to wait for the database.

No restarts should be needed for local changes to be reflected (assuming the code is mounted). The default log level has also been set to DEBUG.

Tests

Tests must execute Kong in daemon mode otherwise they will hang (i.e. KONG_NGINX_DAEMON=on, note the on).

To run tests for your custom plugin (assuming it is in /kong-plugin/spec):

export LUA_PATH="/kong-plugin/?.lua;/kong-plugin/?/init.lua;;"
bin/busted -o gtest -v --exclude-tags=ci /kong-plugin/spec/

About

An unofficial Docker image (tooling) for Kong testing, and development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%
0