Skip to content

Commit

Permalink
fix: minio ssl 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
jcy0308 committed Aug 30, 2024
1 parent 02c93f7 commit 1d4aa60
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { MinioModule } from './minio/minio.module';
import { MinioClientModule } from './minio/minio-client.module';
import { KafkaModule } from './kafka/kafka.module';
import { PuppeteerModule } from './puppeteer/puppeteer.module';
import { ConfigModule } from '@nestjs/config';
Expand All @@ -13,7 +13,7 @@ import { ConfigModule } from '@nestjs/config';
cache: true,
...(process.env.APP_ENV !== 'production' && { envFilePath: '.env' }),
}),
MinioModule,
MinioClientModule,
KafkaModule,
PuppeteerModule,
],
Expand Down
2 changes: 1 addition & 1 deletion src/kafka/kafka.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Module } from '@nestjs/common';
import { KafkaService } from './kafka.service';
import { PuppeteerModule } from '../puppeteer/puppeteer.module';
import { MinioModule } from '../minio/minio.module';
import { MinioModule } from '../minio/minio-client.module';

@Module({
imports: [PuppeteerModule, MinioModule],
Expand Down
23 changes: 23 additions & 0 deletions src/minio/minio-client.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Global, Module } from '@nestjs/common';
import { MinioService } from './minio.service';
import { MinioModule } from 'nestjs-minio-client';
import { ConfigModule, ConfigService } from '@nestjs/config';
@Global()
@Module({
imports: [
MinioModule.registerAsync({
imports: [ConfigModule],
inject: [ConfigService],
useFactory: async (configService: ConfigService) => ({
endPoint: configService.get('MINIO_END_POINT'),
port: parseInt(configService.get('MINIO_PORT')),
useSSL: true,
accessKey: configService.get('MINIO_ACCESS_KEY'),
secretKey: configService.get('MINIO_SECRET_KEY'),
}),
}),
],
providers: [MinioService],
exports: [MinioService],
})
export class MinioClientModule {}
8 changes: 0 additions & 8 deletions src/minio/minio.module.ts

This file was deleted.

0 comments on commit 1d4aa60

Please sign in to comment.