Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Rebuild phantomjs inside docker #855

Merged
merged 1 commit into from
Oct 17, 2018

Conversation

kesselb
Copy link
Contributor

@kesselb kesselb commented Oct 17, 2018

Description:

Close #833

We copy node_modules into the docker image. I suppose that the phantomjs version for travis ci does not work for the docker image. This pull request add package.json / package-lock.json into the container and execute npm rebuild during docker build.

COPY api/node_modules /usr/src/app/node_modules

PhantomJS needs to be compiled separately for each platform. This installer finds a prebuilt binary for your operating system, and downloads it.

If you check your dependencies into git, and work on a cross-platform team, then you need to tell NPM to rebuild any platform-specific dependencies. Run

https://www.npmjs.com/package/phantomjs-prebuilt#cross-platform-repositories

There is no requirement to install Qt, WebKit, or any other libraries. It however still relies on Fontconfig (the package fontconfig or libfontconfig, depending on the distribution).

https://www.npmjs.com/package/phantomjs-prebuilt#linux-note

Improvements

  • A working version ofr phantomjs is shipped with docker image
  • Export as PDF work

Known Issues:

NONE

@kesselb kesselb added bug This Issue describes a unwanted behavior api All Backend related Issues labels Oct 17, 2018
@kesselb kesselb force-pushed the bugfix/noid/rebuild-phantomjs-in-docker branch from 22ba57b to ac09362 Compare October 17, 2018 15:12
@kesselb kesselb force-pushed the bugfix/noid/rebuild-phantomjs-in-docker branch from ac09362 to eac3fa7 Compare October 17, 2018 15:40
@aeimer
Copy link
Collaborator

aeimer commented Oct 17, 2018

If it works as suspect perfect. Looks good

Copy link
Collaborator

@aeimer aeimer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The source code looks good to me. please let some else review this also...

@Gargamil
Copy link
Collaborator

Just tested by locally building the api container. It works!

@Gargamil Gargamil merged commit 097c26f into develop Oct 17, 2018
@kesselb kesselb deleted the bugfix/noid/rebuild-phantomjs-in-docker branch October 17, 2018 18:17
@kesselb kesselb mentioned this pull request Oct 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api All Backend related Issues bug This Issue describes a unwanted behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Download single PDF
3 participants