fix(services): Improve services and commit flow: stop AiDoc, use silent docker inspect, sync ports with logging, fix config loading, and bump deps

This commit is contained in:
2025-08-16 11:38:21 +00:00
parent cc37f70185
commit fba3e9d2b0
7 changed files with 1602 additions and 209 deletions

View File

@@ -86,7 +86,7 @@ export class ServiceConfiguration {
* Load configuration from file
*/
private async loadConfig(): Promise<void> {
const configContent = await plugins.smartfile.fs.toStringSync(this.configPath);
const configContent = plugins.smartfile.fs.toStringSync(this.configPath);
this.config = JSON.parse(configContent);
}
@@ -301,6 +301,7 @@ export class ServiceConfiguration {
if (portMappings && portMappings['27017']) {
const dockerPort = portMappings['27017'];
if (this.config.MONGODB_PORT !== dockerPort) {
logger.log('note', `📍 Syncing MongoDB port from Docker: ${dockerPort}`);
this.config.MONGODB_PORT = dockerPort;
updated = true;
}
@@ -315,6 +316,7 @@ export class ServiceConfiguration {
if (portMappings['9000']) {
const dockerPort = portMappings['9000'];
if (this.config.S3_PORT !== dockerPort) {
logger.log('note', `📍 Syncing S3 API port from Docker: ${dockerPort}`);
this.config.S3_PORT = dockerPort;
updated = true;
}
@@ -322,6 +324,7 @@ export class ServiceConfiguration {
if (portMappings['9001']) {
const dockerPort = portMappings['9001'];
if (this.config.S3_CONSOLE_PORT !== dockerPort) {
logger.log('note', `📍 Syncing S3 Console port from Docker: ${dockerPort}`);
this.config.S3_CONSOLE_PORT = dockerPort;
updated = true;
}
@@ -336,6 +339,7 @@ export class ServiceConfiguration {
this.config.S3_ENDPOINT = `${protocol}://${this.config.S3_HOST}:${this.config.S3_PORT}`;
await this.saveConfig();
logger.log('ok', '✅ Configuration synced with Docker containers');
}
}