Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
ff57f8a322 | |||
968e67330d | |||
935ee20e83 | |||
c205180991 |
17
changelog.md
17
changelog.md
@@ -1,5 +1,22 @@
|
||||
# Changelog
|
||||
|
||||
## 2025-08-15 - 1.17.5 - fix(services)
|
||||
Update S3 credentials naming and add S3_ENDPOINT/S3_USESSL support for improved MinIO integration
|
||||
|
||||
- Replaced S3_USER/S3_PASS with S3_ACCESSKEY/S3_SECRETKEY in ServiceConfiguration
|
||||
- Added S3_ENDPOINT field with automatic protocol selection based on S3_USESSL
|
||||
- Introduced S3_USESSL boolean field for SSL/TLS configuration
|
||||
- Updated ServiceManager logging to display new S3_USESSL configuration
|
||||
- Added .claude/settings.local.json for local permission settings
|
||||
|
||||
## 2025-08-15 - 1.17.4 - fix(services)
|
||||
Update S3 credentials naming and add S3_ENDPOINT/S3_USESSL support for improved MinIO integration
|
||||
|
||||
- Replaced S3_USER/S3_PASS with S3_ACCESSKEY/S3_SECRETKEY in ServiceConfiguration
|
||||
- Added S3_ENDPOINT field with automatic protocol selection based on S3_USESSL
|
||||
- Added S3_USESSL boolean field for SSL/TLS configuration support
|
||||
- Updated ServiceManager to use new credential names in container setup and logging
|
||||
|
||||
## 2025-08-15 - 1.17.3 - fix(serviceconfig)
|
||||
Update service configuration to include dynamic MongoDB connection string and add local permissions settings
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@git.zone/cli",
|
||||
"private": false,
|
||||
"version": "1.17.3",
|
||||
"version": "1.17.5",
|
||||
"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",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
|
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/cli',
|
||||
version: '1.17.3',
|
||||
version: '1.17.5',
|
||||
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.'
|
||||
}
|
||||
|
@@ -13,9 +13,11 @@ export interface IServiceConfig {
|
||||
S3_HOST: string;
|
||||
S3_PORT: string;
|
||||
S3_CONSOLE_PORT: string;
|
||||
S3_USER: string;
|
||||
S3_PASS: string;
|
||||
S3_ACCESSKEY: string;
|
||||
S3_SECRETKEY: string;
|
||||
S3_BUCKET: string;
|
||||
S3_ENDPOINT: string;
|
||||
S3_USESSL: boolean;
|
||||
}
|
||||
|
||||
export class ServiceConfiguration {
|
||||
@@ -101,6 +103,8 @@ export class ServiceConfiguration {
|
||||
const mongoHost = 'localhost';
|
||||
const mongoName = projectName;
|
||||
const mongoPortStr = mongoPort.toString();
|
||||
const s3Host = 'localhost';
|
||||
const s3PortStr = s3Port.toString();
|
||||
|
||||
this.config = {
|
||||
PROJECT_NAME: projectName,
|
||||
@@ -110,12 +114,14 @@ export class ServiceConfiguration {
|
||||
MONGODB_USER: mongoUser,
|
||||
MONGODB_PASS: mongoPass,
|
||||
MONGODB_URL: `mongodb://${mongoUser}:${mongoPass}@${mongoHost}:${mongoPortStr}/${mongoName}?authSource=admin`,
|
||||
S3_HOST: 'localhost',
|
||||
S3_PORT: s3Port.toString(),
|
||||
S3_HOST: s3Host,
|
||||
S3_PORT: s3PortStr,
|
||||
S3_CONSOLE_PORT: s3ConsolePort.toString(),
|
||||
S3_USER: 'defaultadmin',
|
||||
S3_PASS: 'defaultpass',
|
||||
S3_BUCKET: `${projectName}-documents`
|
||||
S3_ACCESSKEY: 'defaultadmin',
|
||||
S3_SECRETKEY: 'defaultpass',
|
||||
S3_BUCKET: `${projectName}-documents`,
|
||||
S3_ENDPOINT: `http://${s3Host}:${s3PortStr}`,
|
||||
S3_USESSL: false
|
||||
};
|
||||
|
||||
await this.saveConfig();
|
||||
@@ -206,15 +212,15 @@ export class ServiceConfiguration {
|
||||
updated = true;
|
||||
}
|
||||
|
||||
if (!this.config.S3_USER) {
|
||||
this.config.S3_USER = 'defaultadmin';
|
||||
fieldsAdded.push('S3_USER');
|
||||
if (!this.config.S3_ACCESSKEY) {
|
||||
this.config.S3_ACCESSKEY = 'defaultadmin';
|
||||
fieldsAdded.push('S3_ACCESSKEY');
|
||||
updated = true;
|
||||
}
|
||||
|
||||
if (!this.config.S3_PASS) {
|
||||
this.config.S3_PASS = 'defaultpass';
|
||||
fieldsAdded.push('S3_PASS');
|
||||
if (!this.config.S3_SECRETKEY) {
|
||||
this.config.S3_SECRETKEY = 'defaultpass';
|
||||
fieldsAdded.push('S3_SECRETKEY');
|
||||
updated = true;
|
||||
}
|
||||
|
||||
@@ -224,6 +230,21 @@ export class ServiceConfiguration {
|
||||
updated = true;
|
||||
}
|
||||
|
||||
if (!this.config.S3_USESSL) {
|
||||
this.config.S3_USESSL = false;
|
||||
fieldsAdded.push('S3_USESSL');
|
||||
updated = true;
|
||||
}
|
||||
|
||||
// Always update S3_ENDPOINT based on current settings
|
||||
const oldEndpoint = this.config.S3_ENDPOINT;
|
||||
const protocol = this.config.S3_USESSL ? 'https' : 'http';
|
||||
this.config.S3_ENDPOINT = `${protocol}://${this.config.S3_HOST}:${this.config.S3_PORT}`;
|
||||
if (oldEndpoint !== this.config.S3_ENDPOINT) {
|
||||
fieldsAdded.push('S3_ENDPOINT');
|
||||
updated = true;
|
||||
}
|
||||
|
||||
if (updated) {
|
||||
await this.saveConfig();
|
||||
logger.log('ok', `✅ Added missing fields: ${fieldsAdded.join(', ')}`);
|
||||
|
@@ -137,8 +137,8 @@ export class ServiceManager {
|
||||
[directories.minio]: '/data'
|
||||
},
|
||||
environment: {
|
||||
MINIO_ROOT_USER: config.S3_USER,
|
||||
MINIO_ROOT_PASSWORD: config.S3_PASS
|
||||
MINIO_ROOT_USER: config.S3_ACCESSKEY,
|
||||
MINIO_ROOT_PASSWORD: config.S3_SECRETKEY
|
||||
},
|
||||
restart: 'unless-stopped',
|
||||
command: 'server /data --console-address ":9001"'
|
||||
@@ -153,7 +153,7 @@ export class ServiceManager {
|
||||
// Create default bucket
|
||||
await this.docker.exec(
|
||||
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(
|
||||
@@ -172,7 +172,7 @@ export class ServiceManager {
|
||||
logger.log('info', ` Port: ${config.S3_PORT}`);
|
||||
logger.log('info', ` Bucket: ${config.S3_BUCKET}`);
|
||||
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}/***)`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -294,12 +294,13 @@ export class ServiceManager {
|
||||
logger.log('info', ` Host: ${config.S3_HOST}`);
|
||||
logger.log('info', ` API Port: ${config.S3_PORT}`);
|
||||
logger.log('info', ` Console Port: ${config.S3_CONSOLE_PORT}`);
|
||||
logger.log('info', ` User: ${config.S3_USER}`);
|
||||
logger.log('info', ' Password: ***');
|
||||
logger.log('info', ` Access Key: ${config.S3_ACCESSKEY}`);
|
||||
logger.log('info', ' Secret Key: ***');
|
||||
logger.log('info', ` Bucket: ${config.S3_BUCKET}`);
|
||||
logger.log('info', ` Use SSL: ${config.S3_USESSL}`);
|
||||
logger.log('info', ` Container: ${this.config.getContainerNames().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}`);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user