refactor: 启用 conf.UseEnv 并将 etc 配置统一为 env 占位
This commit is contained in:
@@ -20,7 +20,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
svcCtx := svc.NewServiceContext(c)
|
||||
|
||||
handler := chathandler.NewHandler(svcCtx)
|
||||
|
||||
@@ -17,10 +17,8 @@ Hybrid:
|
||||
Wt:
|
||||
Addr: :8443
|
||||
Path: /wt/chat
|
||||
CertFile: /etc/certs/tls.crt
|
||||
KeyFile: /etc/certs/tls.key
|
||||
Auth:
|
||||
Enabled: true
|
||||
CertFile: "${CHAT_WT_CERT_FILE}"
|
||||
KeyFile: "${CHAT_WT_KEY_FILE}"
|
||||
Auth:
|
||||
Enabled: true
|
||||
FallbackStrategy: auto
|
||||
@@ -31,18 +29,18 @@ Hybrid:
|
||||
WsHeaderName: x-auth-user-id
|
||||
WtTokenSource: cookie
|
||||
WtTokenName: JToken
|
||||
WtJWTSecret: MGUyMWE3ZDhjMTQ5ZDg1MWViOWU0MGM3OTE2NWVkYTBlOTE5ZWRkZDU1YjYzOGJjOWRiNzM0NTc4NDIyMjlkZQ
|
||||
WtJWTSecret: "${JWT_SECRET_KEY}"
|
||||
|
||||
Stateless:
|
||||
PollInterval: 100ms
|
||||
BatchSize: 100
|
||||
|
||||
Mongo:
|
||||
URI: mongodb://mongo:27017
|
||||
Database: juwan_chat
|
||||
URI: "${MONGO_URI}"
|
||||
Database: "${MONGO_DATABASE}"
|
||||
|
||||
Redis:
|
||||
Addr: redis:6379
|
||||
Addr: "${REDIS_HOST}:${REDIS_PORT}"
|
||||
|
||||
Log:
|
||||
Level: info
|
||||
|
||||
@@ -22,7 +22,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
|
||||
server := rest.MustNewServer(c.RestConf)
|
||||
server.Use(middlewares.NewHeaderExtractorMiddleware().Handle)
|
||||
|
||||
@@ -7,16 +7,13 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== PROC CONFIG =====
|
||||
#CommunityRpcConf:
|
||||
# Target: k8s://juwan/community-rpc-svc.juwan:8080
|
||||
#UsercenterRpcConf:
|
||||
# Target: k8s://juwan/users-rpc-svc.juwan:8080
|
||||
|
||||
# ===== DEV CONFIG =====
|
||||
CommunityRpcConf:
|
||||
Endpoints:
|
||||
- community-rpc:8080
|
||||
- "${COMMUNITY_RPC_TARGET}"
|
||||
|
||||
UsercenterRpcConf:
|
||||
Endpoints:
|
||||
- user-rpc:8080
|
||||
- "${USER_RPC_TARGET}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -6,36 +6,18 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== PROC CONF =====
|
||||
#SnowflakeRpcConf:
|
||||
# Target: k8s://juwan/snowflake-svc:8080
|
||||
#
|
||||
#DB:
|
||||
# Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-rw.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
# Slave: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-ro.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
#
|
||||
#CacheConf:
|
||||
# - Host: "${REDIS_M_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
# - Host: "${REDIS_S_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
|
||||
# ===== DEV CONF =====
|
||||
SnowflakeRpcConf:
|
||||
Endpoints:
|
||||
- snowflake:8080
|
||||
- "${SNOWFLAKE_RPC_TARGET}"
|
||||
|
||||
DB:
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST_RO}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
|
||||
CacheConf:
|
||||
- Host: "${REDIS_HOST}:${REDIS_PORT}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -22,7 +22,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
|
||||
server := rest.MustNewServer(c.RestConf)
|
||||
server.Use(middlewares.NewHeaderExtractorMiddleware().Handle)
|
||||
|
||||
@@ -7,13 +7,17 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== DEV CONFIG =====
|
||||
DisputeRpcConf:
|
||||
Endpoints:
|
||||
- dispute-rpc:8080
|
||||
- "${DISPUTE_RPC_TARGET}"
|
||||
|
||||
OrderRpcConf:
|
||||
Endpoints:
|
||||
- order-rpc:8080
|
||||
- "${ORDER_RPC_TARGET}"
|
||||
|
||||
PlayerRpcConf:
|
||||
Endpoints:
|
||||
- player-rpc:8080
|
||||
- "${PLAYER_RPC_TARGET}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -6,18 +6,18 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== DEV CONF =====
|
||||
SnowflakeRpcConf:
|
||||
Endpoints:
|
||||
- snowflake:8080
|
||||
- "${SNOWFLAKE_RPC_TARGET}"
|
||||
|
||||
DB:
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST_RO}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
|
||||
CacheConf:
|
||||
- Host: "${REDIS_HOST}:${REDIS_PORT}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -7,21 +7,10 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== PROC CONFIG =====
|
||||
#CacheConf:
|
||||
# - Host: "${REDIS_M_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
# - Host: "${REDIS_S_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
|
||||
# ===== DEV CONFIG =====
|
||||
CacheConf:
|
||||
- Host: "${REDIS_HOST}:${REDIS_PORT}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
|
||||
Kmq:
|
||||
Name: email-api
|
||||
@@ -29,3 +18,6 @@ Kmq:
|
||||
- "${KAFKA_BROKER}"
|
||||
Group: "email-api-group"
|
||||
Topic: "email-task"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -30,15 +30,5 @@ Mail:
|
||||
InsecureSkipVerify: false
|
||||
ReplyTo: "${EMAIL_REPLY_TO}"
|
||||
|
||||
# Mail:
|
||||
# Enabled: true
|
||||
# Host: "smtp.163.com"
|
||||
# Port: 465
|
||||
# Username: "churong2646@163.com"
|
||||
# Password: "GTv6C6qNbv5urAiD"
|
||||
# FromAddress: "churong2646@163.com"
|
||||
# FromName: "聚玩"
|
||||
# UseSSL: true
|
||||
# UseStartTLS: false
|
||||
# InsecureSkipVerify: false
|
||||
# ReplyTo: ""
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -7,14 +7,9 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== PROC CONF =====
|
||||
#GameRpcConf:
|
||||
# Target: k8s://juwan/game-rpc-svc:8080
|
||||
|
||||
# ===== DEV CONF =====
|
||||
GameRpcConf:
|
||||
Endpoints:
|
||||
- game-rpc:8080
|
||||
- "${GAME_RPC_TARGET}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
@@ -22,7 +22,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
|
||||
server := rest.MustNewServer(c.RestConf)
|
||||
server.Use(middlewares.NewRequestMiddleware().Handle)
|
||||
|
||||
@@ -6,40 +6,18 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== PROC CONF =====
|
||||
#DB:
|
||||
# Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-rw.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
# Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-ro.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
#
|
||||
#
|
||||
#SnowflakeRpcConf:
|
||||
# Target: k8s://juwan/snowflake-svc:8080
|
||||
#
|
||||
#CacheConf:
|
||||
# - Host: "${REDIS_M_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
# - Host: "${REDIS_S_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
#
|
||||
#Log:
|
||||
# Level: info
|
||||
|
||||
# ===== DEV CONF =====
|
||||
SnowflakeRpcConf:
|
||||
Endpoints:
|
||||
- snowflake:8080
|
||||
- "${SNOWFLAKE_RPC_TARGET}"
|
||||
|
||||
DB:
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST_RO}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
|
||||
CacheConf:
|
||||
- Host: "${REDIS_HOST}:${REDIS_PORT}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -7,7 +7,9 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== DEV CONFIG =====
|
||||
NotificationRpcConf:
|
||||
Endpoints:
|
||||
- notification-rpc:8080
|
||||
- "${NOTIFICATION_RPC_TARGET}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -22,7 +22,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
|
||||
server := rest.MustNewServer(c.RestConf)
|
||||
server.Use(middlewares.NewHeaderExtractorMiddleware().Handle)
|
||||
|
||||
@@ -6,18 +6,18 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== DEV CONF =====
|
||||
SnowflakeRpcConf:
|
||||
Endpoints:
|
||||
- snowflake:8080
|
||||
- "${SNOWFLAKE_RPC_TARGET}"
|
||||
|
||||
DB:
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST_RO}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
|
||||
CacheConf:
|
||||
- Host: "${REDIS_HOST}:${REDIS_PORT}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -7,21 +7,9 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
|
||||
# ===== PROC CONF =====
|
||||
#FileRpcConf:
|
||||
# Target: k8s://juwan/objectstory-rpc-svc:8080
|
||||
#
|
||||
#Log:
|
||||
# Level: info
|
||||
|
||||
# ===== DEV CONF =====
|
||||
FileRpcConf:
|
||||
Endpoints:
|
||||
- objectstory-rpc:8080
|
||||
- "${OBJECTSTORY_RPC_TARGET}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
# k8s://juwan/<service name>:8080
|
||||
|
||||
Level: debug
|
||||
|
||||
@@ -22,7 +22,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
|
||||
server := rest.MustNewServer(c.RestConf)
|
||||
server.Use(middlewares.NewRequestMiddleware().Handle)
|
||||
|
||||
@@ -6,36 +6,13 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# Target: k8s://juwan/<service name>.<namespace>:8080
|
||||
#S3Conf:
|
||||
# Endpoint: "${S3_ENDPOINT}"
|
||||
# AccessKey: "${S3_ACCESS_KEY}"
|
||||
# SecretKey: "${S3_SECRET_KEY}"
|
||||
# Bucket: "${S3_BUCKET_NAME}"
|
||||
# Region: "${S3_REGION}"
|
||||
|
||||
S3Conf:
|
||||
Endpoint: "https://cn-nb1.rains3.com"
|
||||
AccessKey: "mfgGnaAcUDP2zYAi"
|
||||
SecretKey: "ZfKkbhUvsAchiKlxzIXrDHrSyskyRj"
|
||||
Bucket: "juwan-dev-image-zj"
|
||||
Region: auto
|
||||
Endpoint: "${S3_ENDPOINT}"
|
||||
AccessKey: "${S3_ACCESS_KEY}"
|
||||
SecretKey: "${S3_SECRET_KEY}"
|
||||
Bucket: "${S3_BUCKET_NAME}"
|
||||
Region: "${S3_REGION}"
|
||||
UsePathStyle: true
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
#DB:
|
||||
# Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-rw.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
# Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-ro.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
#
|
||||
#CacheConf:
|
||||
# - Host: "${REDIS_M_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
# - Host: "${REDIS_S_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
#
|
||||
|
||||
@@ -22,7 +22,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
ctx := svc.NewServiceContext(c)
|
||||
|
||||
s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
|
||||
|
||||
@@ -7,26 +7,17 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# k8s://juwan/<service name>:8080
|
||||
# ===== PROC CONF =====
|
||||
#OrderRpcConf:
|
||||
# Target: k8s://juwan/order-rpc-svc:8080
|
||||
#
|
||||
#PlayerRpcConf:
|
||||
# Target: k8s://juwan/player-rpc-svc:8080
|
||||
#
|
||||
#ShopRpcConf:
|
||||
# Target: k8s://juwan/shop-rpc-svc:8080
|
||||
|
||||
# ===== DEV CONF ====
|
||||
OrderRpcConf:
|
||||
Endpoints:
|
||||
- order-rpc:8080
|
||||
- "${ORDER_RPC_TARGET}"
|
||||
|
||||
PlayerRpcConf:
|
||||
Endpoints:
|
||||
- player-rpc:8080
|
||||
- "${PLAYER_RPC_TARGET}"
|
||||
|
||||
ShopRpcConf:
|
||||
Endpoints:
|
||||
- shop-rpc:8080
|
||||
- "${SHOP_RPC_TARGET}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -22,7 +22,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
|
||||
server := rest.MustNewServer(c.RestConf)
|
||||
server.Use(middlewares.NewRequestMiddleware().Handle)
|
||||
|
||||
@@ -1,54 +1,23 @@
|
||||
Name: pb.rpc
|
||||
ListenOn: 0.0.0.0:8080
|
||||
|
||||
|
||||
Prometheus:
|
||||
Host: 0.0.0.0
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# tcd:
|
||||
# Hosts:
|
||||
# - 127.0.0.1:2379
|
||||
# Key: pb.rpc
|
||||
|
||||
# Target: k8s://juwan/<service name>.<namespace>:8080
|
||||
|
||||
# ==== PROC CONF ====
|
||||
#SnowflakeRpcConf:
|
||||
# Target: k8s://juwan/snowflake-svc:8080
|
||||
#
|
||||
#
|
||||
#DB:
|
||||
# Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-rw.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
# Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-ro.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
#
|
||||
#
|
||||
#CacheConf:
|
||||
# - Host: "${REDIS_M_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
# - Host: "${REDIS_S_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
#
|
||||
#Log:
|
||||
# Level: info
|
||||
|
||||
# ==== DEV CONF ====
|
||||
SnowflakeRpcConf:
|
||||
Endpoints:
|
||||
- snowflake:8080
|
||||
- "${SNOWFLAKE_RPC_TARGET}"
|
||||
|
||||
DB:
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST_RO}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
|
||||
CacheConf:
|
||||
- Host: "${REDIS_HOST}:${REDIS_PORT}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
@@ -7,15 +7,13 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# k8s://juwan/<service name>:8080
|
||||
# ===== PROC CONF =====
|
||||
#PlayerRpcConf:
|
||||
# Target: k8s://juwan/player-rpc-svc:8080
|
||||
|
||||
# ===== DEV CONF ====
|
||||
PlayerRpcConf:
|
||||
Endpoints:
|
||||
- player-rpc:8080
|
||||
- "${PLAYER_RPC_TARGET}"
|
||||
|
||||
UsercenterRpcConf:
|
||||
Endpoints:
|
||||
- user-rpc:8080
|
||||
- "${USER_RPC_TARGET}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -22,7 +22,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
|
||||
server := rest.MustNewServer(c.RestConf)
|
||||
server.Use(middlewares.NewHeaderExtractorMiddleware().Handle)
|
||||
|
||||
@@ -1,48 +1,23 @@
|
||||
Name: pb.rpc
|
||||
ListenOn: 0.0.0.0:8080
|
||||
|
||||
|
||||
Prometheus:
|
||||
Host: 0.0.0.0
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
|
||||
|
||||
|
||||
# ===== PROC CONF =====
|
||||
#SnowflakeRpcConf:
|
||||
# Target: k8s://juwan/snowflake-svc:8080
|
||||
|
||||
#DB:
|
||||
# Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-rw.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
# Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-ro.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
#
|
||||
#CacheConf:
|
||||
# - Host: "${REDIS_M_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
# - Host: "${REDIS_S_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
#
|
||||
#Log:
|
||||
# Level: info
|
||||
|
||||
# ===== DEV CONF =====
|
||||
SnowflakeRpcConf:
|
||||
Endpoints:
|
||||
- snowflake:8080
|
||||
- "${SNOWFLAKE_RPC_TARGET}"
|
||||
|
||||
DB:
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST_RO}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
|
||||
CacheConf:
|
||||
- Host: "${REDIS_HOST}:${REDIS_PORT}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -7,13 +7,17 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== DEV CONFIG =====
|
||||
ReviewRpcConf:
|
||||
Endpoints:
|
||||
- review-rpc:8080
|
||||
- "${REVIEW_RPC_TARGET}"
|
||||
|
||||
OrderRpcConf:
|
||||
Endpoints:
|
||||
- order-rpc:8080
|
||||
- "${ORDER_RPC_TARGET}"
|
||||
|
||||
PlayerRpcConf:
|
||||
Endpoints:
|
||||
- player-rpc:8080
|
||||
- "${PLAYER_RPC_TARGET}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -22,7 +22,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
|
||||
server := rest.MustNewServer(c.RestConf)
|
||||
server.Use(middlewares.NewHeaderExtractorMiddleware().Handle)
|
||||
|
||||
@@ -6,18 +6,18 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== DEV CONF =====
|
||||
SnowflakeRpcConf:
|
||||
Endpoints:
|
||||
- snowflake:8080
|
||||
- "${SNOWFLAKE_RPC_TARGET}"
|
||||
|
||||
DB:
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST_RO}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
|
||||
CacheConf:
|
||||
- Host: "${REDIS_HOST}:${REDIS_PORT}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -7,7 +7,9 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== DEV CONFIG =====
|
||||
SearchRpcConf:
|
||||
Endpoints:
|
||||
- search-rpc:8080
|
||||
- "${SEARCH_RPC_TARGET}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -22,7 +22,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
|
||||
server := rest.MustNewServer(c.RestConf)
|
||||
server.Use(middlewares.NewHeaderExtractorMiddleware().Handle)
|
||||
|
||||
@@ -6,18 +6,18 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== DEV CONF =====
|
||||
SnowflakeRpcConf:
|
||||
Endpoints:
|
||||
- snowflake:8080
|
||||
- "${SNOWFLAKE_RPC_TARGET}"
|
||||
|
||||
DB:
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST_RO}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
|
||||
CacheConf:
|
||||
- Host: "${REDIS_HOST}:${REDIS_PORT}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -7,17 +7,13 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# k8s://juwan/<service name>:8080
|
||||
|
||||
# ===== PROC CONFIG =====
|
||||
#ShopRpcConf:
|
||||
# Target: k8s://juwan/shop-rpc-svc.juwan:8080
|
||||
|
||||
|
||||
# ===== DEV CONFIG ====
|
||||
ShopRpcConf:
|
||||
Endpoints:
|
||||
- shop-rpc:8080
|
||||
- "${SHOP_RPC_TARGET}"
|
||||
|
||||
PlayerRpcConf:
|
||||
Endpoints:
|
||||
- player-rpc:8080
|
||||
- "${PLAYER_RPC_TARGET}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -22,7 +22,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
|
||||
server := rest.MustNewServer(c.RestConf)
|
||||
server.Use(middlewares.NewHeaderExtractorMiddleware().Handle)
|
||||
|
||||
@@ -6,53 +6,22 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# tcd:
|
||||
# Hosts:
|
||||
# - 127.0.0.1:2379
|
||||
# Key: pb.rpc
|
||||
|
||||
# ===== PROC Config =====
|
||||
#SnowflakeRpcConf:
|
||||
# Target: k8s://juwan/snowflake-svc:8080
|
||||
#UsersRpcConf:
|
||||
# Target: k8s://juwan/user-rpc-svc:8080
|
||||
|
||||
#DB:
|
||||
# Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@{DB_HOST_RW}.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
# Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@{BD_HOST_RO}.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
#
|
||||
#
|
||||
#CacheConf:
|
||||
# - Host: "${REDIS_M_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
# - Host: "${REDIS_S_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
|
||||
# ===== DEV Config =====
|
||||
SnowflakeRpcConf:
|
||||
Endpoints:
|
||||
- snowflake:8080
|
||||
- "${SNOWFLAKE_RPC_TARGET}"
|
||||
|
||||
UsersRpcConf:
|
||||
Endpoints:
|
||||
- user-rpc:8080
|
||||
- "${USER_RPC_TARGET}"
|
||||
|
||||
DB:
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST_RO}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
|
||||
CacheConf:
|
||||
- Host: "${REDIS_HOST}:${REDIS_PORT}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
|
||||
Log:
|
||||
Level: info
|
||||
|
||||
|
||||
# Target: k8s://juwan/<service name>.<namespace>:8080
|
||||
#DB:
|
||||
# Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-rw.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
# Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-ro.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Level: debug
|
||||
|
||||
@@ -22,7 +22,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
ctx := svc.NewServiceContext(c)
|
||||
|
||||
s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
|
||||
|
||||
@@ -1,45 +1,27 @@
|
||||
Name: pb.rpc
|
||||
ListenOn: 0.0.0.0:8080
|
||||
|
||||
Prometheus:
|
||||
Host: 0.0.0.0
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== PROC Config =====
|
||||
#SnowflakeRpcConf:
|
||||
# Target: k8s://juwan/snowflake-svc.juwan:8080
|
||||
#UserRpcConf:
|
||||
# Target: k8s://juwan/user-rpc-svc.juwan:8080
|
||||
#
|
||||
#DB:
|
||||
# Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-rw.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
# Slave: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-ro.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
#
|
||||
#CacheConf:
|
||||
# - Host: "${REDIS_M_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
# - Host: "${REDIS_S_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
#
|
||||
#Log:
|
||||
# Level: info
|
||||
|
||||
# ===== DEV Config =====
|
||||
SnowflakeRpcConf:
|
||||
Endpoints:
|
||||
- snowflake:8080
|
||||
- "${SNOWFLAKE_RPC_TARGET}"
|
||||
|
||||
UserRpcConf:
|
||||
Endpoints:
|
||||
- user-rpc:8080
|
||||
- "${USER_RPC_TARGET}"
|
||||
|
||||
DB:
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slave: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slave: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST_RO}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
|
||||
CacheConf:
|
||||
- Host: "${REDIS_HOST}:${REDIS_PORT}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -7,19 +7,13 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== PROC CONFIG =====
|
||||
#UsercenterRpcConf:
|
||||
# Target: k8s://juwan/user-rpc-svc:8080
|
||||
#UserVerificationRpc:
|
||||
# Target: k8s://juwan/user_verifications-svc:8080
|
||||
|
||||
# ===== DEV CONFIG ====
|
||||
UserVerificationRpc:
|
||||
Endpoints:
|
||||
- user-verifications-rpc:8080
|
||||
- "${USER_VERIFICATIONS_RPC_TARGET}"
|
||||
|
||||
UsercenterRpcConf:
|
||||
Endpoints:
|
||||
- user-rpc:8080
|
||||
- "${USER_RPC_TARGET}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
@@ -22,7 +22,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
|
||||
server := rest.MustNewServer(c.RestConf)
|
||||
server.Use(middlewares.NewHeaderExtractorMiddleware().Handle)
|
||||
|
||||
@@ -6,46 +6,21 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
DataSource: "${DB_URI}?sslmode=disable"
|
||||
|
||||
|
||||
# ===== PROC CONFIG =====
|
||||
#SnowflakeRpcConf:
|
||||
# Target: k8s://juwan/snowflake-svc:8080
|
||||
#
|
||||
#DB:
|
||||
# Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-rw.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
# Slave: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-ro.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
#
|
||||
#CacheConf:
|
||||
# - Host: "${REDIS_M_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
# - Host: "${REDIS_S_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
#
|
||||
#Jwt:
|
||||
# SecretKey: "${JWT_SECRET_KEY}"
|
||||
# Issuer: "juwan-user-rpc"
|
||||
|
||||
# ===== DEV CONFIG =====
|
||||
SnowflakeRpcConf:
|
||||
Endpoints:
|
||||
- snowflake:8080
|
||||
- "${SNOWFLAKE_RPC_TARGET}"
|
||||
|
||||
DB:
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slave: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slave: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST_RO}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
|
||||
CacheConf:
|
||||
- Host: "${REDIS_HOST}:${REDIS_PORT}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
|
||||
Jwt:
|
||||
SecretKey: "MGUyMWE3ZDhjMTQ5ZDg1MWViOWU0MGM3OTE2NWVkYTBlOTE5ZWRkZDU1YjYzOGJjOWRiNzM0NTc4NDIyMjlkZQ"
|
||||
SecretKey: "${JWT_SECRET_KEY}"
|
||||
Issuer: "juwan-user-rpc"
|
||||
|
||||
Log:
|
||||
|
||||
@@ -7,16 +7,9 @@ Prometheus:
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# ===== PROC CONF =====
|
||||
#WalletRpcConf:
|
||||
# Target: k8s://juwan/wallet-rpc:8080
|
||||
|
||||
|
||||
|
||||
# ===== DEV CONF =====
|
||||
WalletRpcConf:
|
||||
Endpoints:
|
||||
- wallet-rpc:8080
|
||||
|
||||
# k8s://juwan/<service name>:8080
|
||||
- "${WALLET_RPC_TARGET}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
|
||||
@@ -22,7 +22,7 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
var c config.Config
|
||||
conf.MustLoad(*configFile, &c)
|
||||
conf.MustLoad(*configFile, &c, conf.UseEnv())
|
||||
|
||||
server := rest.MustNewServer(c.RestConf)
|
||||
server.Use(middlewares.NewRequestMiddleware().Handle)
|
||||
|
||||
@@ -1,55 +1,23 @@
|
||||
Name: pb.rpc
|
||||
ListenOn: 0.0.0.0:8080
|
||||
|
||||
|
||||
Prometheus:
|
||||
Host: 0.0.0.0
|
||||
Port: 4001
|
||||
Path: /metrics
|
||||
|
||||
# tcd:
|
||||
# Hosts:
|
||||
# - 127.0.0.1:2379
|
||||
# Key: pb.rpc
|
||||
|
||||
# Target: k8s://juwan/<service name>.<namespace>:8080
|
||||
|
||||
|
||||
# ===== PROC CONF =====
|
||||
#SnowflakeRpcConf:
|
||||
# Target: k8s://juwan/snowflake-svc:8080
|
||||
#
|
||||
#
|
||||
#DB:
|
||||
# Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-rw.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
# Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@user-db-ro.juwan:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
#
|
||||
#
|
||||
#CacheConf:
|
||||
# - Host: "${REDIS_M_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
# - Host: "${REDIS_S_HOST}"
|
||||
# Type: node
|
||||
# Pass: "${REDIS_PASSWORD}"
|
||||
# User: "default"
|
||||
#
|
||||
#Log:
|
||||
# Level: info
|
||||
|
||||
# ===== DEV CONFIG =====
|
||||
SnowflakeRpcConf:
|
||||
Endpoints:
|
||||
- snowflake:8080
|
||||
- "${SNOWFLAKE_RPC_TARGET}"
|
||||
|
||||
DB:
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Master: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
Slaves: "postgresql://${PD_USERNAME}:${DB_PASSWORD}@${DB_HOST_RO}:${DB_PORT}/${DB_NAME}?sslmode=disable"
|
||||
|
||||
CacheConf:
|
||||
- Host: "${REDIS_HOST}:${REDIS_PORT}"
|
||||
Type: node
|
||||
Pass: "${REDIS_PASSWORD}"
|
||||
|
||||
Log:
|
||||
Level: debug
|
||||
+29
-3
@@ -3,18 +3,44 @@ PD_USERNAME=postgres
|
||||
DB_PASSWORD=123456
|
||||
DB_PORT=5432
|
||||
DB_NAME=app
|
||||
DB_URI=postgresql://postgres:123456@postgres:5432/app
|
||||
DB_HOST=postgres
|
||||
DB_HOST_RO=postgres
|
||||
|
||||
# Redis
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
REDIS_PASSWORD=
|
||||
REDIS_M_HOST=redis:6379
|
||||
REDIS_S_HOST=redis:6379
|
||||
|
||||
# Mongo (chat)
|
||||
MONGO_URI=mongodb://mongo:27017
|
||||
MONGO_DATABASE=juwan_chat
|
||||
|
||||
# Kafka
|
||||
KAFKA_BROKER=kafka:9092
|
||||
|
||||
# JWT
|
||||
JWT_SECRET_KEY=MGUyMWE3ZDhjMTQ5ZDg1MWViOWU0MGM3OTE2NWVkYTBlOTE5ZWRkZDU1YjYzOGJjOWRiNzM0NTc4NDIyMjlkZQ
|
||||
|
||||
# RPC targets (compose DNS)
|
||||
SNOWFLAKE_RPC_TARGET=snowflake:8080
|
||||
USER_RPC_TARGET=user-rpc:8080
|
||||
USER_VERIFICATIONS_RPC_TARGET=user-verifications-rpc:8080
|
||||
PLAYER_RPC_TARGET=player-rpc:8080
|
||||
GAME_RPC_TARGET=game-rpc:8080
|
||||
SHOP_RPC_TARGET=shop-rpc:8080
|
||||
ORDER_RPC_TARGET=order-rpc:8080
|
||||
WALLET_RPC_TARGET=wallet-rpc:8080
|
||||
COMMUNITY_RPC_TARGET=community-rpc:8080
|
||||
REVIEW_RPC_TARGET=review-rpc:8080
|
||||
DISPUTE_RPC_TARGET=dispute-rpc:8080
|
||||
NOTIFICATION_RPC_TARGET=notification-rpc:8080
|
||||
SEARCH_RPC_TARGET=search-rpc:8080
|
||||
OBJECTSTORY_RPC_TARGET=objectstory-rpc:8080
|
||||
|
||||
# Chat WebTransport TLS (dev self-signed; chat service reads OptionalValue with empty fallback)
|
||||
CHAT_WT_CERT_FILE=/etc/certs/tls.crt
|
||||
CHAT_WT_KEY_FILE=/etc/certs/tls.key
|
||||
|
||||
# Email (placeholder)
|
||||
EMAIL_SMTP_HOST=smtp.example.com
|
||||
EMAIL_SMTP_PORT=465
|
||||
|
||||
@@ -451,6 +451,7 @@ services:
|
||||
image: juwan/chat-api:dev
|
||||
container_name: juwan-chat-api
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
ports:
|
||||
- "18810:8888"
|
||||
- "18889:8889"
|
||||
|
||||
Reference in New Issue
Block a user