-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
config.prod.yml
114 lines (106 loc) · 3.7 KB
/
config.prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# App configs
app:
# App name
name: ${HELMET_APP_NAME:-helmet}
# Env mode (dev or prod)
mode: ${HELMET_APP_MODE:-prod}
# HTTP port
port: ${HELMET_API_PORT:-80}
# Hostname
hostname: ${HELMET_API_HOSTNAME:-127.0.0.1}
# TLS configs
tls:
status: ${HELMET_API_TLS_STATUS:-off}
crt_path: ${HELMET_API_TLS_PEMPATH:-cert/server.crt}
key_path: ${HELMET_API_TLS_KEYPATH:-cert/server.key}
# Global timeout
timeout: ${HELMET_API_TIMEOUT:-50}
# API Configs
api:
key: ${HELMET_API_KEY:-6c68b836-6f8e-465e-b59f-89c1db53afca}
# CORS status
cors:
status: ${HELMET_CORS_STATUS:-off}
# Application Database
database:
# Database driver (sqlite3, mysql)
driver: ${HELMET_DATABASE_DRIVER:-sqlite3}
# Database Host
host: ${HELMET_DATABASE_MYSQL_HOST:-localhost}
# Database Port
port: ${HELMET_DATABASE_MYSQL_PORT:-3306}
# Database Name
name: ${HELMET_DATABASE_MYSQL_DATABASE:-helmet.db}
# Database Username
username: ${HELMET_DATABASE_MYSQL_USERNAME:-root}
# Database Password
password: ${HELMET_DATABASE_MYSQL_PASSWORD:-root}
# Key Store Configs
key_store:
# Cache Driver
driver: ${HELMET_KV_DRIVER:-redis}
# Redis Driver Configs
redis:
# Redis Address
address: ${HELMET_KV_REDIS_ADDR:-localhost:6379}
# Redis Password
password: ${HELMET_KV_REDIS_PASSWORD:-}
# Redis Database
database: ${HELMET_KV_REDIS_DB:-0}
# Endpoint Configs
endpoint:
# Orders Internal Service
- name: orders_service
active: true
proxy:
listen_path: "/orders/v2/*"
upstreams:
balancing: roundrobin
targets:
- target: https://httpbin.org/anything/orders1/v2
- target: https://httpbin.org/anything/orders2/v2
- target: https://httpbin.org/anything/orders3/v2
- target: https://httpbin.org/anything/orders4/v2
http_methods:
- ANY
authentication:
status: on
# Rate limit use the key store for fast read write
rate_limit:
status: off
# Circuit Breaker use the key store for fast read write
circuit_breaker:
status: off
# Customers Internal Service
- name: customers_service
active: true
proxy:
listen_path: "/customer/v2/*"
upstreams:
balancing: random
targets:
- target: https://httpbin.org/anything/customers1/v2
- target: https://httpbin.org/anything/customers2/v2
- target: https://httpbin.org/anything/customers3/v2
- target: https://httpbin.org/anything/customers4/v2
http_methods:
- GET
- POST
- PUT
- DELETE
authentication:
status: on
# Rate limit use the key store for fast read write
rate_limit:
status: off
# Circuit Breaker use the key store for fast read write
circuit_breaker:
status: off
# Log configs
log:
# Log level, it can be debug, info, warn, error, panic, fatal
level: ${HELMET_LOG_LEVEL:-info}
# Output can be stdout or abs path to log file /var/logs/helmet.log
output: ${HELMET_LOG_OUTPUT:-/var/logs/helmet.log}
# Format can be json
format: ${HELMET_LOG_FORMAT:-json}