chore: sync changes for v0.1.1
This commit is contained in:
26
scripts/deploy/kong/docker-compose.yml
Normal file
26
scripts/deploy/kong/docker-compose.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
kong:
|
||||
image: kong:3.6
|
||||
environment:
|
||||
KONG_DATABASE: 'off'
|
||||
KONG_DECLARATIVE_CONFIG: /kong/declarative/kong.yaml
|
||||
KONG_PROXY_LISTEN: '0.0.0.0:8000, 0.0.0.0:8443 ssl'
|
||||
KONG_ADMIN_LISTEN: '0.0.0.0:8001, 0.0.0.0:8444 ssl'
|
||||
KONG_LOG_LEVEL: info
|
||||
volumes:
|
||||
- ./kong.yaml:/kong/declarative/kong.yaml:ro
|
||||
ports:
|
||||
- '8000:8000'
|
||||
- '8443:8443'
|
||||
- '8001:8001'
|
||||
- '8444:8444'
|
||||
|
||||
konga:
|
||||
image: pantsel/konga:latest
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
ports:
|
||||
- '1337:1337'
|
||||
depends_on:
|
||||
- kong
|
||||
43
scripts/deploy/kong/kong.yaml
Normal file
43
scripts/deploy/kong/kong.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
_format_version: '3.0'
|
||||
_transform: true
|
||||
|
||||
services:
|
||||
- name: wwjcloud-backend
|
||||
url: http://host.docker.internal:3001
|
||||
routes:
|
||||
- name: frontend-api
|
||||
paths:
|
||||
- /api
|
||||
strip_path: false
|
||||
methods: [GET, POST, PUT, PATCH, DELETE]
|
||||
- name: admin-api
|
||||
paths:
|
||||
- /adminapi
|
||||
strip_path: false
|
||||
methods: [GET, POST, PUT, PATCH, DELETE]
|
||||
plugins:
|
||||
- name: rate-limiting
|
||||
config:
|
||||
minute: 600
|
||||
policy: local
|
||||
- name: request-transformer
|
||||
config:
|
||||
add:
|
||||
headers:
|
||||
- 'x-forwarded-for: kong'
|
||||
- name: response-transformer
|
||||
- name: proxy-cache
|
||||
config:
|
||||
strategy: memory
|
||||
content_type:
|
||||
- application/json
|
||||
cache_ttl: 30
|
||||
- name: prometheus
|
||||
- name: correlation-id
|
||||
config:
|
||||
header_name: X-Request-ID
|
||||
generator: uuid
|
||||
echo_downstream: true
|
||||
- name: request-size-limiting
|
||||
config:
|
||||
allowed_payload_size: 10
|
||||
Reference in New Issue
Block a user