fix: 统一数据库默认密码 change_me → cyrene_pass
Docker Compose 和 .env 使用 cyrene_pass,但 5 个 Go 源码文件 和 DevTools config.js 中的 fallback 密码仍是 change_me, 导致 memory-service/tool-engine/gateway 启动后 DB 认证失败。 修复 7 个文件中的硬编码 fallback 密码,统一为 cyrene_pass。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ LOG_LEVEL=debug
|
||||
POSTGRES_HOST=localhost
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_USER=cyrene
|
||||
POSTGRES_PASSWORD=change_me
|
||||
POSTGRES_PASSWORD=cyrene_pass
|
||||
POSTGRES_DB=cyrene_ai
|
||||
|
||||
# ========== Redis ==========
|
||||
|
||||
@@ -249,7 +249,7 @@ func buildDatabaseURL() string {
|
||||
host := getEnv("POSTGRES_HOST", "localhost")
|
||||
port := getEnv("POSTGRES_PORT", "5432")
|
||||
user := getEnv("POSTGRES_USER", "cyrene")
|
||||
password := getEnv("POSTGRES_PASSWORD", "change_me")
|
||||
password := getEnv("POSTGRES_PASSWORD", "cyrene_pass")
|
||||
dbname := getEnv("POSTGRES_DB", "cyrene_ai")
|
||||
sslmode := getEnv("POSTGRES_SSLMODE", "disable")
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ func Load() *Config {
|
||||
PostgresHost: getEnv("POSTGRES_HOST", "localhost"),
|
||||
PostgresPort: getEnv("POSTGRES_PORT", "5432"),
|
||||
PostgresUser: getEnv("POSTGRES_USER", "cyrene"),
|
||||
PostgresPass: getEnv("POSTGRES_PASSWORD", "change_me"),
|
||||
PostgresPass: getEnv("POSTGRES_PASSWORD", "cyrene_pass"),
|
||||
PostgresDB: getEnv("POSTGRES_DB", "cyrene_ai"),
|
||||
|
||||
RedisHost: getEnv("REDIS_HOST", "localhost"),
|
||||
|
||||
@@ -29,7 +29,7 @@ func buildDatabaseURL() string {
|
||||
host := getEnv("POSTGRES_HOST", "localhost")
|
||||
port := getEnv("POSTGRES_PORT", "5432")
|
||||
user := getEnv("POSTGRES_USER", "cyrene")
|
||||
password := getEnv("POSTGRES_PASSWORD", "change_me")
|
||||
password := getEnv("POSTGRES_PASSWORD", "cyrene_pass")
|
||||
dbname := getEnv("POSTGRES_DB", "cyrene_ai")
|
||||
sslmode := getEnv("POSTGRES_SSLMODE", "disable")
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ func DBUrlFromEnv() string {
|
||||
host := getEnv("DB_HOST", "localhost")
|
||||
port := getEnv("DB_PORT", "5432")
|
||||
user := getEnv("DB_USER", "cyrene")
|
||||
pass := getEnv("DB_PASSWORD", "change_me")
|
||||
pass := getEnv("DB_PASSWORD", "cyrene_pass")
|
||||
dbname := getEnv("DB_NAME", "cyrene_ai")
|
||||
sslmode := getEnv("DB_SSLMODE", "disable")
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ export const SERVICES = {
|
||||
command: './main',
|
||||
env: {
|
||||
PORT: '8091',
|
||||
DB_URL: process.env.DB_URL || 'postgres://cyrene:change_me@localhost:5432/cyrene_ai?sslmode=disable',
|
||||
DB_URL: process.env.DB_URL || 'postgres://cyrene:cyrene_pass@localhost:5432/cyrene_ai?sslmode=disable',
|
||||
},
|
||||
healthUrl: 'http://localhost:8091/api/v1/health',
|
||||
port: 8091,
|
||||
@@ -107,7 +107,7 @@ export const SERVICES = {
|
||||
command: './main',
|
||||
env: {
|
||||
PORT: '8092',
|
||||
DB_URL: process.env.DB_URL || 'postgres://cyrene:change_me@localhost:5432/cyrene_ai?sslmode=disable',
|
||||
DB_URL: process.env.DB_URL || 'postgres://cyrene:cyrene_pass@localhost:5432/cyrene_ai?sslmode=disable',
|
||||
IOT_SERVICE_URL: process.env.IOT_SERVICE_URL || process.env.IOT_DEBUG_SERVICE_URL || 'http://localhost:8083',
|
||||
},
|
||||
healthUrl: 'http://localhost:8092/api/v1/health',
|
||||
|
||||
@@ -7,7 +7,7 @@ services:
|
||||
image: pgvector/pgvector:pg16
|
||||
environment:
|
||||
POSTGRES_USER: cyrene
|
||||
POSTGRES_PASSWORD: change_me
|
||||
POSTGRES_PASSWORD: cyrene_pass
|
||||
POSTGRES_DB: cyrene_ai
|
||||
ports:
|
||||
- "5432:5432"
|
||||
@@ -67,7 +67,7 @@ services:
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: "5432"
|
||||
POSTGRES_USER: cyrene
|
||||
POSTGRES_PASSWORD: change_me
|
||||
POSTGRES_PASSWORD: cyrene_pass
|
||||
POSTGRES_DB: cyrene_ai
|
||||
ports:
|
||||
- "8091:8091"
|
||||
@@ -84,7 +84,7 @@ services:
|
||||
PORT: "8092"
|
||||
IOT_SERVICE_URL: http://iot-debug-service:8083
|
||||
DATA_DIR: /tmp/cyrene_data
|
||||
DB_URL: "postgres://cyrene:change_me@postgres:5432/cyrene_ai?sslmode=disable"
|
||||
DB_URL: "postgres://cyrene:cyrene_pass@postgres:5432/cyrene_ai?sslmode=disable"
|
||||
ports:
|
||||
- "8092:8092"
|
||||
depends_on:
|
||||
@@ -119,7 +119,7 @@ services:
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: "5432"
|
||||
POSTGRES_USER: cyrene
|
||||
POSTGRES_PASSWORD: change_me
|
||||
POSTGRES_PASSWORD: cyrene_pass
|
||||
POSTGRES_DB: cyrene_ai
|
||||
IOT_DEBUG_SERVICE_URL: http://iot-debug-service:8083
|
||||
ENABLE_BACKGROUND_THINKING: ${ENABLE_BACKGROUND_THINKING:-true}
|
||||
@@ -159,7 +159,7 @@ services:
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: "5432"
|
||||
POSTGRES_USER: cyrene
|
||||
POSTGRES_PASSWORD: change_me
|
||||
POSTGRES_PASSWORD: cyrene_pass
|
||||
POSTGRES_DB: cyrene_ai
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: "6379"
|
||||
|
||||
Reference in New Issue
Block a user