feat: enhance Docker configuration and update environment variables

- Updated .dockerignore to include additional files and directories for better Docker build context management.
- Modified compose.yaml to add BASE_URL and change BUCKET_NAME to improve environment configuration.
- Refactored Dockerfile to implement a multi-stage build for optimized image size and performance.
- Updated package.json to include a new script for production Prisma generation.
- Adjusted tsconfig files to refine project structure and exclude unnecessary directories.
- Removed delta.mdx.txt file from OpenAI instructions to streamline the service.
- Updated package-lock.json and package.json to upgrade Prisma and related dependencies for improved functionality.
This commit is contained in:
2024-12-05 18:37:34 +07:00
parent ac2014079f
commit 2033d0ec26
12 changed files with 294 additions and 64 deletions

View File

@@ -125,7 +125,7 @@ export class MinioService {
}
listRecords(roomId: string) {
return this.minioClient.listObjects(this.configService.get('BUCKET_NAME') ?? 'epess', `records/${roomId}`)
return this.minioClient.listObjects(this.configService.get('BUCKET_NAME') ?? 'epess', `epess/records/${roomId}`)
}
// export document to docx format by get all pages and convert to docx
async exportDocument(id: string) {

View File

@@ -5,7 +5,7 @@ import { z } from 'zod'
import { zodResponseFormat } from 'openai/helpers/zod'
import { readFileSync } from 'fs'
const DELTA_INSTRUCTIONS = readFileSync('./src/OpenAI/Instructions/delta.mdx.txt', 'utf8')
const DELTA_INSTRUCTIONS = ''
@Injectable()
export class OpenaiService {