Skip to content

Instantly share code, notes, and snippets.

@einnar82
Last active July 21, 2021 05:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save einnar82/45d8198885f1138ba244207bbc654898 to your computer and use it in GitHub Desktop.
Save einnar82/45d8198885f1138ba244207bbc654898 to your computer and use it in GitHub Desktop.
Kong DB Less config
version: "3.7"
services:
kong:
image: kong:latest
volumes:
- ./kong.yml:/usr/local/kong/declarative/kong.yml
environment:
- KONG_DATABASE=off
- KONG_DECLARATIVE_CONFIG=/usr/local/kong/declarative/kong.yml
- KONG_PROXY_ACCESS_LOG=/dev/stdout
- KONG_ADMIN_ACCESS_LOG=/dev/stdout
- KONG_PROXY_ERROR_LOG=/dev/stderr
- KONG_ADMIN_ERROR_LOG=/dev/stderr
- KONG_ADMIN_LISTEN=0.0.0.0:8001, 0.0.0.0:8444 ssl
ports:
- "8000:8000"
- "8443:8443"
- "127.0.0.1:8001:8001"
- "127.0.0.1:8444:8444"
_format_version: "2.1"
services:
- name: bulacan-service
url: https://bulacan-districts.herokuapp.com
routes:
- name: bulacan-route
paths:
- /bulacan-districts
strip_path: true
consumers:
- custom_id: petnetdev
username: petnetdev
- custom_id: iremit
username: iremit
jwt_secrets:
- consumer: petnetdev
secret: "cXzhMwzpaWX;=RT@kJ#[._&u7p?eu4:[A97@MQv4"
- consumer: iremit
secret: "q{MAp&9Jd.&]jA.q!PY/;*UVjtZ-R%QZ[hk@WPf@"
plugins:
- name: jwt
config:
secret_is_base64: false
run_on_preflight: true
claims_to_verify:
- exp
- name: rate-limiting
service: bulacan-service
config:
minute: 200
hour: 10000
policy: local
- name: proxy-cache
config:
content_type:
- "application/json; charset=utf-8"
cache_ttl: 30
strategy: memory
- name: cors
config:
origins:
- https://bulacan-districts.herokuapp.com
methods:
- GET
- POST
headers:
- Accept
- Accept-Version
- Content-Length
- Content-MD5
- Content-Type
- Date
- X-Auth-Token
exposed_headers:
- X-Auth-Token
credentials: true
max_age: 3600
preflight_continue: false
_format_version: "2.1"
services:
- name: bulacan-service
url: https://bulacan-districts.herokuapp.com
routes:
- name: bulacan-route
paths:
- /bulacan-districts
strip_path: true
plugins:
- name: key-auth
consumers:
- custom_id: consumer
username: consumer
keyauth_credentials:
- key: your-secret
plugins:
- name: rate-limiting
service: bulacan-service
config:
minute: 200
hour: 10000
policy: local
- name: proxy-cache
config:
content_type:
- "application/json; charset=utf-8"
cache_ttl: 30
strategy: memory
- name: cors
config:
origins:
- https://bulacan-districts.herokuapp.com
methods:
- GET
- POST
headers:
- Accept
- Accept-Version
- Content-Length
- Content-MD5
- Content-Type
- Date
- X-Auth-Token
exposed_headers:
- X-Auth-Token
credentials: true
max_age: 3600
preflight_continue: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment