Skip to content

Commit

Permalink
build: fix chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
pupilcc committed Oct 17, 2024
1 parent dcef774 commit f84f558
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ COPY . .
RUN pnpm run build:ts

FROM node:20-alpine
RUN apk update && apk add --no-cache chromium
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
COPY --from=build /app/dist ./dist
Expand Down
2 changes: 1 addition & 1 deletion src/application/archive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function generateHTML(id:string, url: string): Promise<void> {
const outputPath = path.join(__dirname, '../temp', filename)

// Execute single-file-cli
await execAsync(`single-file ${url} "${outputPath}"`)
await execAsync(`single-file --browser-executable-path=/usr/bin/chromium-browser ${url} "${outputPath}"`)

// Read the generated file
const fileContent = await fs.promises.readFile(outputPath)
Expand Down

0 comments on commit f84f558

Please sign in to comment.