Skip to content

Tifancy/apigateway-docker-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aliyun API Gateway and Docker Application Demo

For Yunqi Document: API网关遇上容器服务

Backend Service Providing API

Use Openresty to create a simple API Service.

Add below code in nginx.conf:

...
http {
    server {
        listen 8080;
        location / {
            default_type text/html;
            content_by_lua '
                ngx.say("<p>hello, world</p>")
            ';
        }
    }
}

test it in local environment:

curl http://localhost:8080/

Build Docker and deploy it to Aliyun Container Service

Please refer Dockerfile for how to build Docker image.

Use [docker-compose.yml] to deploy it to Aliyun Container Service.

About

Aliyun API Gateway and Docker Application Demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.4%
  • Other 0.6%