Code Monkey home page Code Monkey logo

docker-kong-dev's Introduction

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 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/

docker-kong-dev's People

Contributors

mrsaints avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.