iloom/.env.example
Chever John 24c449ecae
security: remove hardcoded credentials and add WebSocket auth/CORS
- Clear default passwords in all service configs, require env vars
- Add JWT auth + role middleware to WebSocket endpoints
- Add origin whitelist to WebSocket upgrader (CORS protection)
- Fix goroutine leak in WS proxy (double errCh read)
- Update docker-compose to require secrets via ${VAR:?...} syntax
- Mark deprecated k8s configmap passwords as REPLACE_AT_DEPLOY_TIME

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 23:16:17 +08:00

31 lines
809 B
Plaintext

# iloom 微服务环境变量配置
# Copy this file to .env and fill in real values. NEVER commit .env to git.
# MySQL (共享 muyu_wms 数据库)
MYSQL_ROOT_PASSWORD=your_mysql_password_here
DB_DSN=root:your_password@tcp(mysql:3306)/muyu_wms?parseTime=true&charset=utf8mb4
# JWT (复用 muyu 认证)
JWT_SECRET=your_jwt_secret_here
JWT_REFRESH_SECRET=your_jwt_refresh_secret_here
# muyu gRPC 地址
MUYU_SYSTEM_RPC_ADDR=system-rpc:9001
MUYU_INVENTORY_RPC_ADDR=inventory-rpc:9002
# 服务间调用密钥
INTERNAL_SERVICE_KEY=your_internal_service_key_here
# 服务端口
GATEWAY_PORT=8080
AUTH_SERVICE_PORT=8081
PURCHASER_SERVICE_PORT=8082
TEXTILE_SERVICE_PORT=8083
WASHING_SERVICE_PORT=8084
# 前端
FRONTEND_URL=http://localhost:3015
# CORS
ALLOW_ORIGINS=http://localhost:3015,http://localhost:3000