For Yunqi Document: 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/
Please refer Dockerfile for how to build Docker image.
Use [docker-compose.yml] to deploy it to Aliyun Container Service.