fix(db): use POSTGRES_* env vars in knowledge and evolution services
These services were using DB_HOST, DB_USER etc. but docker-compose sets POSTGRES_HOST, POSTGRES_USER etc. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
c98cae2e39
commit
7adbaaa871
|
|
@ -19,11 +19,11 @@ import { HealthModule } from './health/health.module';
|
||||||
inject: [ConfigService],
|
inject: [ConfigService],
|
||||||
useFactory: (config: ConfigService) => ({
|
useFactory: (config: ConfigService) => ({
|
||||||
type: 'postgres',
|
type: 'postgres',
|
||||||
host: config.get('DB_HOST', 'localhost'),
|
host: config.get('POSTGRES_HOST', 'localhost'),
|
||||||
port: config.get('DB_PORT', 5432),
|
port: config.get<number>('POSTGRES_PORT', 5432),
|
||||||
username: config.get('DB_USER', 'iconsulting'),
|
username: config.get('POSTGRES_USER', 'postgres'),
|
||||||
password: config.get('DB_PASSWORD', 'iconsulting_dev'),
|
password: config.get('POSTGRES_PASSWORD'),
|
||||||
database: config.get('DB_NAME', 'iconsulting'),
|
database: config.get('POSTGRES_DB', 'iconsulting'),
|
||||||
autoLoadEntities: true,
|
autoLoadEntities: true,
|
||||||
synchronize: config.get('NODE_ENV') !== 'production',
|
synchronize: config.get('NODE_ENV') !== 'production',
|
||||||
logging: config.get('NODE_ENV') === 'development',
|
logging: config.get('NODE_ENV') === 'development',
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,11 @@ import { HealthModule } from './health/health.module';
|
||||||
inject: [ConfigService],
|
inject: [ConfigService],
|
||||||
useFactory: (config: ConfigService) => ({
|
useFactory: (config: ConfigService) => ({
|
||||||
type: 'postgres',
|
type: 'postgres',
|
||||||
host: config.get('DB_HOST', 'localhost'),
|
host: config.get('POSTGRES_HOST', 'localhost'),
|
||||||
port: config.get('DB_PORT', 5432),
|
port: config.get<number>('POSTGRES_PORT', 5432),
|
||||||
username: config.get('DB_USER', 'iconsulting'),
|
username: config.get('POSTGRES_USER', 'postgres'),
|
||||||
password: config.get('DB_PASSWORD', 'iconsulting_dev'),
|
password: config.get('POSTGRES_PASSWORD'),
|
||||||
database: config.get('DB_NAME', 'iconsulting'),
|
database: config.get('POSTGRES_DB', 'iconsulting'),
|
||||||
autoLoadEntities: true,
|
autoLoadEntities: true,
|
||||||
synchronize: config.get('NODE_ENV') !== 'production',
|
synchronize: config.get('NODE_ENV') !== 'production',
|
||||||
logging: config.get('NODE_ENV') === 'development',
|
logging: config.get('NODE_ENV') === 'development',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue