Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
935ee20e83 | |||
c205180991 | |||
4a53bc4abc | |||
a86fb3bb8e | |||
b187000ae4 | |||
c715adfd6c |
22
changelog.md
22
changelog.md
@@ -1,5 +1,27 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-08-15 - 1.17.4 - fix(services)
|
||||||
|
Update S3 credentials naming and add S3_ENDPOINT support for improved MinIO integration
|
||||||
|
|
||||||
|
- Replaced S3_USER/S3_PASS with S3_ACCESSKEY/S3_SECRETKEY in ServiceConfiguration.
|
||||||
|
- Added S3_ENDPOINT field with default endpoint in ServiceConfiguration.
|
||||||
|
- Updated ServiceManager to use new credential names in container setup and logging.
|
||||||
|
- Introduced .claude/settings.local.json for permission settings.
|
||||||
|
|
||||||
|
## 2025-08-15 - 1.17.3 - fix(serviceconfig)
|
||||||
|
Update service configuration to include dynamic MongoDB connection string and add local permissions settings
|
||||||
|
|
||||||
|
- Added .claude/settings.local.json for local permissions configuration
|
||||||
|
- Updated ServiceConfiguration to compute and update MONGODB_URL based on current config values
|
||||||
|
|
||||||
|
## 2025-08-15 - 1.17.2 - fix(ci-test-services)
|
||||||
|
Update CI/CD configurations, test settings, and Docker service for MongoDB.
|
||||||
|
|
||||||
|
- Add .claude/settings.local.json with updated permission settings
|
||||||
|
- Introduce new GitLab CI, VSCode launch and settings, and updated test configuration files (.gitignore, .npmrc, npmextra.json, package.json, qenv.yml, readme.md)
|
||||||
|
- Update test scripts in test/test and test/ts to improve project validation
|
||||||
|
- Fix MongoDB Docker container command by adding '--bind_ip_all' for proper network binding
|
||||||
|
|
||||||
## 2025-08-15 - 1.17.1 - fix(services)
|
## 2025-08-15 - 1.17.1 - fix(services)
|
||||||
Improve services module logging and enhance MongoDB Compass integration
|
Improve services module logging and enhance MongoDB Compass integration
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@git.zone/cli",
|
"name": "@git.zone/cli",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.17.1",
|
"version": "1.17.4",
|
||||||
"description": "A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.",
|
"description": "A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.",
|
||||||
"main": "dist_ts/index.ts",
|
"main": "dist_ts/index.ts",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
|
1
test
Submodule
1
test
Submodule
Submodule test added at 0b89443584
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@git.zone/cli',
|
name: '@git.zone/cli',
|
||||||
version: '1.16.10',
|
version: '1.17.4',
|
||||||
description: 'A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.'
|
description: 'A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.'
|
||||||
}
|
}
|
||||||
|
@@ -9,12 +9,14 @@ export interface IServiceConfig {
|
|||||||
MONGODB_PORT: string;
|
MONGODB_PORT: string;
|
||||||
MONGODB_USER: string;
|
MONGODB_USER: string;
|
||||||
MONGODB_PASS: string;
|
MONGODB_PASS: string;
|
||||||
|
MONGODB_URL: string;
|
||||||
S3_HOST: string;
|
S3_HOST: string;
|
||||||
S3_PORT: string;
|
S3_PORT: string;
|
||||||
S3_CONSOLE_PORT: string;
|
S3_CONSOLE_PORT: string;
|
||||||
S3_USER: string;
|
S3_ACCESSKEY: string;
|
||||||
S3_PASS: string;
|
S3_SECRETKEY: string;
|
||||||
S3_BUCKET: string;
|
S3_BUCKET: string;
|
||||||
|
S3_ENDPOINT: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ServiceConfiguration {
|
export class ServiceConfiguration {
|
||||||
@@ -95,19 +97,29 @@ export class ServiceConfiguration {
|
|||||||
s3ConsolePort++;
|
s3ConsolePort++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const mongoUser = 'defaultadmin';
|
||||||
|
const mongoPass = 'defaultpass';
|
||||||
|
const mongoHost = 'localhost';
|
||||||
|
const mongoName = projectName;
|
||||||
|
const mongoPortStr = mongoPort.toString();
|
||||||
|
const s3Host = 'localhost';
|
||||||
|
const s3PortStr = s3Port.toString();
|
||||||
|
|
||||||
this.config = {
|
this.config = {
|
||||||
PROJECT_NAME: projectName,
|
PROJECT_NAME: projectName,
|
||||||
MONGODB_HOST: 'localhost',
|
MONGODB_HOST: mongoHost,
|
||||||
MONGODB_NAME: projectName,
|
MONGODB_NAME: mongoName,
|
||||||
MONGODB_PORT: mongoPort.toString(),
|
MONGODB_PORT: mongoPortStr,
|
||||||
MONGODB_USER: 'defaultadmin',
|
MONGODB_USER: mongoUser,
|
||||||
MONGODB_PASS: 'defaultpass',
|
MONGODB_PASS: mongoPass,
|
||||||
S3_HOST: 'localhost',
|
MONGODB_URL: `mongodb://${mongoUser}:${mongoPass}@${mongoHost}:${mongoPortStr}/${mongoName}?authSource=admin`,
|
||||||
S3_PORT: s3Port.toString(),
|
S3_HOST: s3Host,
|
||||||
|
S3_PORT: s3PortStr,
|
||||||
S3_CONSOLE_PORT: s3ConsolePort.toString(),
|
S3_CONSOLE_PORT: s3ConsolePort.toString(),
|
||||||
S3_USER: 'defaultadmin',
|
S3_ACCESSKEY: 'defaultadmin',
|
||||||
S3_PASS: 'defaultpass',
|
S3_SECRETKEY: 'defaultpass',
|
||||||
S3_BUCKET: `${projectName}-documents`
|
S3_BUCKET: `${projectName}-documents`,
|
||||||
|
S3_ENDPOINT: `http://${s3Host}:${s3PortStr}`
|
||||||
};
|
};
|
||||||
|
|
||||||
await this.saveConfig();
|
await this.saveConfig();
|
||||||
@@ -164,6 +176,14 @@ export class ServiceConfiguration {
|
|||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Always update MONGODB_URL based on current settings
|
||||||
|
const oldUrl = this.config.MONGODB_URL;
|
||||||
|
this.config.MONGODB_URL = `mongodb://${this.config.MONGODB_USER}:${this.config.MONGODB_PASS}@${this.config.MONGODB_HOST}:${this.config.MONGODB_PORT}/${this.config.MONGODB_NAME}?authSource=admin`;
|
||||||
|
if (oldUrl !== this.config.MONGODB_URL) {
|
||||||
|
fieldsAdded.push('MONGODB_URL');
|
||||||
|
updated = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.config.S3_HOST) {
|
if (!this.config.S3_HOST) {
|
||||||
this.config.S3_HOST = 'localhost';
|
this.config.S3_HOST = 'localhost';
|
||||||
fieldsAdded.push('S3_HOST');
|
fieldsAdded.push('S3_HOST');
|
||||||
@@ -190,15 +210,15 @@ export class ServiceConfiguration {
|
|||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.config.S3_USER) {
|
if (!this.config.S3_ACCESSKEY) {
|
||||||
this.config.S3_USER = 'defaultadmin';
|
this.config.S3_ACCESSKEY = 'defaultadmin';
|
||||||
fieldsAdded.push('S3_USER');
|
fieldsAdded.push('S3_ACCESSKEY');
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.config.S3_PASS) {
|
if (!this.config.S3_SECRETKEY) {
|
||||||
this.config.S3_PASS = 'defaultpass';
|
this.config.S3_SECRETKEY = 'defaultpass';
|
||||||
fieldsAdded.push('S3_PASS');
|
fieldsAdded.push('S3_SECRETKEY');
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,6 +228,14 @@ export class ServiceConfiguration {
|
|||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Always update S3_ENDPOINT based on current settings
|
||||||
|
const oldEndpoint = this.config.S3_ENDPOINT;
|
||||||
|
this.config.S3_ENDPOINT = `http://${this.config.S3_HOST}:${this.config.S3_PORT}`;
|
||||||
|
if (oldEndpoint !== this.config.S3_ENDPOINT) {
|
||||||
|
fieldsAdded.push('S3_ENDPOINT');
|
||||||
|
updated = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (updated) {
|
if (updated) {
|
||||||
await this.saveConfig();
|
await this.saveConfig();
|
||||||
logger.log('ok', `✅ Added missing fields: ${fieldsAdded.join(', ')}`);
|
logger.log('ok', `✅ Added missing fields: ${fieldsAdded.join(', ')}`);
|
||||||
|
@@ -73,7 +73,8 @@ export class ServiceManager {
|
|||||||
MONGO_INITDB_ROOT_PASSWORD: config.MONGODB_PASS,
|
MONGO_INITDB_ROOT_PASSWORD: config.MONGODB_PASS,
|
||||||
MONGO_INITDB_DATABASE: config.MONGODB_NAME
|
MONGO_INITDB_DATABASE: config.MONGODB_NAME
|
||||||
},
|
},
|
||||||
restart: 'unless-stopped'
|
restart: 'unless-stopped',
|
||||||
|
command: '--bind_ip_all'
|
||||||
});
|
});
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
@@ -136,8 +137,8 @@ export class ServiceManager {
|
|||||||
[directories.minio]: '/data'
|
[directories.minio]: '/data'
|
||||||
},
|
},
|
||||||
environment: {
|
environment: {
|
||||||
MINIO_ROOT_USER: config.S3_USER,
|
MINIO_ROOT_USER: config.S3_ACCESSKEY,
|
||||||
MINIO_ROOT_PASSWORD: config.S3_PASS
|
MINIO_ROOT_PASSWORD: config.S3_SECRETKEY
|
||||||
},
|
},
|
||||||
restart: 'unless-stopped',
|
restart: 'unless-stopped',
|
||||||
command: 'server /data --console-address ":9001"'
|
command: 'server /data --console-address ":9001"'
|
||||||
@@ -152,7 +153,7 @@ export class ServiceManager {
|
|||||||
// Create default bucket
|
// Create default bucket
|
||||||
await this.docker.exec(
|
await this.docker.exec(
|
||||||
containers.minio,
|
containers.minio,
|
||||||
`mc alias set local http://localhost:9000 ${config.S3_USER} ${config.S3_PASS}`
|
`mc alias set local http://localhost:9000 ${config.S3_ACCESSKEY} ${config.S3_SECRETKEY}`
|
||||||
);
|
);
|
||||||
|
|
||||||
await this.docker.exec(
|
await this.docker.exec(
|
||||||
@@ -171,7 +172,7 @@ export class ServiceManager {
|
|||||||
logger.log('info', ` Port: ${config.S3_PORT}`);
|
logger.log('info', ` Port: ${config.S3_PORT}`);
|
||||||
logger.log('info', ` Bucket: ${config.S3_BUCKET}`);
|
logger.log('info', ` Bucket: ${config.S3_BUCKET}`);
|
||||||
logger.log('info', ` API: http://${config.S3_HOST}:${config.S3_PORT}`);
|
logger.log('info', ` API: http://${config.S3_HOST}:${config.S3_PORT}`);
|
||||||
logger.log('info', ` Console: http://${config.S3_HOST}:${config.S3_CONSOLE_PORT} (login: ${config.S3_USER}/***)`);
|
logger.log('info', ` Console: http://${config.S3_HOST}:${config.S3_CONSOLE_PORT} (login: ${config.S3_ACCESSKEY}/***)`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -293,12 +294,12 @@ export class ServiceManager {
|
|||||||
logger.log('info', ` Host: ${config.S3_HOST}`);
|
logger.log('info', ` Host: ${config.S3_HOST}`);
|
||||||
logger.log('info', ` API Port: ${config.S3_PORT}`);
|
logger.log('info', ` API Port: ${config.S3_PORT}`);
|
||||||
logger.log('info', ` Console Port: ${config.S3_CONSOLE_PORT}`);
|
logger.log('info', ` Console Port: ${config.S3_CONSOLE_PORT}`);
|
||||||
logger.log('info', ` User: ${config.S3_USER}`);
|
logger.log('info', ` Access Key: ${config.S3_ACCESSKEY}`);
|
||||||
logger.log('info', ' Password: ***');
|
logger.log('info', ' Secret Key: ***');
|
||||||
logger.log('info', ` Bucket: ${config.S3_BUCKET}`);
|
logger.log('info', ` Bucket: ${config.S3_BUCKET}`);
|
||||||
logger.log('info', ` Container: ${this.config.getContainerNames().minio}`);
|
logger.log('info', ` Container: ${this.config.getContainerNames().minio}`);
|
||||||
logger.log('info', ` Data: ${this.config.getDataDirectories().minio}`);
|
logger.log('info', ` Data: ${this.config.getDataDirectories().minio}`);
|
||||||
logger.log('info', ` API URL: http://${config.S3_HOST}:${config.S3_PORT}`);
|
logger.log('info', ` Endpoint: ${config.S3_ENDPOINT}`);
|
||||||
logger.log('info', ` Console URL: http://${config.S3_HOST}:${config.S3_CONSOLE_PORT}`);
|
logger.log('info', ` Console URL: http://${config.S3_HOST}:${config.S3_CONSOLE_PORT}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user