License Service#
Environment Variables#
設定ファイル内の設定値は環境変数で上書きできます。
例えば、設定ファイルが次のようになっている場合、
[section]
attributes-1 = "value"
以下のような環境変数で設定を上書きできます。
LICENSE_SECTION_ATTRIBUTES_1="overwrite"
設定値が文字列の配列である場合は、カンマ区切りでの指定が可能です。
例えば、設定ファイルが次のようになっている場合、
[section]
array-attributes = ['val1', 'val2']
環境変数に以下のような値を与えることで設定を上書きできます。
LICENSE_SECTION_ARRAY_ATTRIBUTES="overwrite1,overwrite2
テーブルの配列([[section-name]]のように二重角括弧で記述)の中の項目は、環境変数による上書きはできません。
Reference#
すべての設定項目と、デフォルト値を示します。
api#
Property |
Description |
Default |
|---|---|---|
bind-address |
0.0.0.0:8080 |
[api]
bind-address = '0.0.0.0:8080'
gops#
Property |
Description |
Default |
|---|---|---|
enable |
false |
|
address |
127.0.0.1:0 |
[gops]
enable = false
address = '127.0.0.1:0'
logger#
Property |
Description |
Default |
|---|---|---|
level |
info |
|
encoding |
json |
[logger]
level = 'info'
encoding = 'json'
postgres#
Property |
Description |
Default |
|---|---|---|
dbname |
license |
|
username |
license |
|
password |
license |
|
address |
attrdb-license:5432 |
|
max-idle-conns |
10 |
|
max-open-conns |
10 |
|
max-conn-idle-time |
0s |
|
max-conn-lifetime |
10m0s |
[postgres]
dbname = 'license'
username = 'license'
password = 'license'
address = 'attrdb-license:5432'
max-idle-conns = 10
max-open-conns = 10
max-conn-idle-time = '0s'
max-conn-lifetime = '10m0s'
health#
Property |
Description |
Default |
|---|---|---|
enable |
false |
|
bind-address |
0.0.0.0:9080 |
|
base-path |
[health]
enable = false
bind-address = '0.0.0.0:9080'
base-path = ''
jet-stream#
Property |
Description |
Default |
|---|---|---|
url |
nats://nats:4222 |
|
username |
intdash |
|
password |
aptpod1234 |
|
max-delivery-count |
3 |
|
max-pings-outstanding |
3 |
|
ping-interval |
5s |
|
max-reconnects |
1800 |
|
reconnect-wait |
2s |
|
replicas |
0 |
[jet-stream]
url = 'nats://nats:4222'
username = 'intdash'
password = 'aptpod1234'
max-delivery-count = 3
max-pings-outstanding = 3
ping-interval = '5s'
max-reconnects = 1800
reconnect-wait = '2s'
replicas = 0
event-bus#
Property |
Description |
Default |
|---|---|---|
driver |
jet-stream |
|
publish-interval |
10s |
|
function-timeout |
1h |
[event-bus]
driver = 'jet-stream'
publish-interval = '10s'
function-timeout = '1h'
exporter#
Property |
Description |
Default |
|---|---|---|
driver |
各サービスから収集した利用量をどこに出力するかを指定します。有効な値は noop`(どこにも出力しない), `opensearch です。 |
noop |
[exporter]
# 各サービスから収集した利用量をどこに出力するかを指定します。
# 有効な値は `noop`(どこにも出力しない), `opensearch` です。
driver = 'noop'
opensearch#
未設定の場合、デフォルト値が使用されます。
Property |
Description |
Default |
|---|---|---|
region |
CognitoとOpenSearchのリージョンです。 |
ap-northeast-1 |
identity-pool-id |
CognitoのIdentity Pool IDです。形式: ap-northeast-1:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx |
|
user-pool-id |
CognitoのUser Pool IDです。形式: ap-northeast-1xxxxxxxxxx |
|
client-id |
CognitoのUser Pool App Client IDです。 |
|
client-secret |
CognitoのUser Pool App Client Secretです。 |
|
username |
OpenSearchに書き込むCognito Userのユーザ名です。形式: data-writer@example.com |
|
password |
OpenSearchに書き込むCognito Userのパスワードです。 |
|
address |
OpenSearchのエンドポイントです。形式: (AWSの場合) https://search-xxxxxxxxxxxxxx.ap-northeast-1.es.amazonaws.com |
[opensearch]
# CognitoとOpenSearchのリージョンです。
region = 'ap-northeast-1'
# CognitoのIdentity Pool IDです。
# 形式: ap-northeast-1:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
identity-pool-id = ''
# CognitoのUser Pool IDです。
# 形式: ap-northeast-1xxxxxxxxxx
user-pool-id = ''
# CognitoのUser Pool App Client IDです。
client-id = ''
# CognitoのUser Pool App Client Secretです。
client-secret = ''
# OpenSearchに書き込むCognito Userのユーザ名です。
# 形式: data-writer@example.com
username = ''
# OpenSearchに書き込むCognito Userのパスワードです。
password = ''
# OpenSearchのエンドポイントです。
# 形式: (AWSの場合) https://search-xxxxxxxxxxxxxx.ap-northeast-1.es.amazonaws.com
address = ''
license#
ライセンスの情報を取得するエンドポイントです。
Property |
Description |
Default |
|---|---|---|
info-endpoint |
http://127.0.0.1:8081/auth/license/info |
[license]
info-endpoint = 'http://127.0.0.1:8081/auth/license/info'