## 概要 [タスク 1327: DevOpsからRegistryにイメージをプッシュ](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/OMDSDictation/_workitems/edit/1327) - AzureDevOpsでデプロイするためにDockerFile等の構成を修正しました。 ## レビューポイント - 情報共有 - コンテナの構成として認識違い、不自然な点はないか ## UIの変更 - なし ## 動作確認状況 - イメージをビルドしてプッシュできることを確認
41 lines
1.4 KiB
TypeScript
41 lines
1.4 KiB
TypeScript
import { MiddlewareConsumer, Module } from '@nestjs/common';
|
|
import { HealthController } from './health.controller';
|
|
import { ServeStaticModule } from '@nestjs/serve-static';
|
|
import { ConfigModule, ConfigService } from '@nestjs/config';
|
|
import { join } from 'path';
|
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
import { LoggerMiddleware } from './common/loggerMiddleware';
|
|
|
|
@Module({
|
|
imports: [
|
|
ServeStaticModule.forRoot({
|
|
rootPath: join(__dirname, '..', 'build'),
|
|
}),
|
|
ConfigModule.forRoot({
|
|
envFilePath: ['.env.local', '.env'],
|
|
isGlobal: true,
|
|
}),
|
|
// TypeOrmModule.forRootAsync({
|
|
// imports: [ConfigModule],
|
|
// useFactory: async (configService: ConfigService) => ({
|
|
// type: 'mysql',
|
|
// host: configService.get('DB_ENDPOINT'),
|
|
// port: configService.get('DB_PORT'),
|
|
// username: configService.get('DB_USERNAME'),
|
|
// password: configService.get('DB_PASSWORD'),
|
|
// database: configService.get('DB_NAME'),
|
|
// autoLoadEntities: true, // forFeature()で登録されたEntityを自動的にロード
|
|
// synchronize: false, // trueにすると自動的にmigrationが行われるため注意
|
|
// }),
|
|
// inject: [ConfigService],
|
|
// }),
|
|
],
|
|
controllers: [HealthController],
|
|
providers: [],
|
|
})
|
|
export class AppModule {
|
|
configure(consumer: MiddlewareConsumer) {
|
|
consumer.apply(LoggerMiddleware).forRoutes('');
|
|
}
|
|
}
|