diff --git a/backend/Dockerfile b/backend/Dockerfile index 4ac1801f..4149f0b5 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -16,5 +16,17 @@ COPY --from=builder /app ./ RUN apk upgrade --update-cache --available && \ apk add openssl && \ rm -rf /var/cache/apk/* + +RUN apk add --no-cache \ + chromium \ + nss \ + freetype \ + harfbuzz \ + ca-certificates \ + ttf-freefont + +ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true +ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium-browser + EXPOSE 3000 -CMD ["npm", "run", "start:prod"] +CMD ["npm", "run", "start:prod"] \ No newline at end of file diff --git a/backend/src/files/files.service.ts b/backend/src/files/files.service.ts index c8342bf5..c147bc65 100644 --- a/backend/src/files/files.service.ts +++ b/backend/src/files/files.service.ts @@ -19,13 +19,18 @@ import { ExportFileRequestBody, ExportFileResponse } from "./types/export-file.t @Injectable() export class FilesService { private s3Client: S3Client; - private readonly markdown = new MarkdownIt(); + private readonly markdown: MarkdownIt; constructor( private configService: ConfigService, private prismaService: PrismaService ) { this.s3Client = new S3Client(); + this.markdown = new MarkdownIt({ + html: true, + breaks: true, + linkify: true, + }); } async createUploadPresignedUrl(