-
-
Notifications
You must be signed in to change notification settings - Fork 44
Release official Docker image + pixel exact image tests #222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
815ca02
adapt Dockerfile's entrypoint for end-user, update doc
antoinerg 623122b
Merge branch 'master' into docker-release
antoinerg ac00cfd
circleci: add test-image
antoinerg a853d66
docker: add ImageMagick config, download MathJax via git
antoinerg 08fe8a9
test-image: load MathJax
antoinerg 3fa197d
test-image: use Inkscape to convert SVG, EPS to PNG instead of IM
antoinerg 697068a
test-image: store artifacts in /build folder
antoinerg 7b10bfe
test-image: move routine into its own file .circleci/test-image.sh
antoinerg e6f37c7
docker: /run_server invokes Orca with an absolute path
antoinerg 88fc32d
test-image: update usage doc for render_mocks_cli
antoinerg 94bb0a4
add shell script to call Orca in Docker
antoinerg 36bb04f
revert changes to .gitignore
antoinerg 3a37405
test-image: log which file format is being generated
antoinerg f5ce6f9
test-image: add documentation in CONTRIBUTING
antoinerg e0bd413
Merge branch 'master' into docker-release
antoinerg c2ec25f
update geo_choropleth-usa baseline
antoinerg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,7 +36,26 @@ $ npm install -g [email protected] orca | |
|
|
||
| which makes the `orca` executable available in your path. | ||
|
|
||
| ### Method 3: Standalone binaries | ||
| ### Method 3: Docker | ||
|
|
||
| ``` | ||
| $ docker pull quay.io/plotly/orca | ||
| ``` | ||
|
|
||
| #### Usage | ||
|
|
||
| If no arguments are specified, it starts an Orca server on port 9091. | ||
| You can publish the port to the outside world the usual way: | ||
| ``` | ||
| $ docker run -d -p 9091:9091 quay.io/plotly/orca | ||
| ``` | ||
| If the first argument is `graph`, | ||
| it executes the command line application `orca graph`: | ||
| ``` | ||
| $ docker run -i quay.io/plotly/orca graph --help | ||
| ``` | ||
|
|
||
| ### Method 4: Standalone binaries | ||
|
|
||
| Alternatively, you can download the standalone Orca binaries corresponding to | ||
| your operating system from the | ||
|
|
@@ -179,7 +198,7 @@ $ orca graph https://plot.ly/~empet/14324.json --format svg | |
|
|
||
| generates an SVG from a plotly.js JSON hosted on [plot.ly](https://plot.ly/). | ||
|
|
||
| When running | ||
| When running | ||
|
|
||
| To print info about the supported arguments, run: | ||
|
|
||
|
|
@@ -323,9 +342,9 @@ See | |
| You can also [contact us](https://plot.ly/products/consulting-and-oem/) if you | ||
| would like a specific feature added. | ||
|
|
||
| | Tests and Linux builds | Mac OS build | Windows build | | ||
| | ---------------------- | ------------ | ------------- | | ||
| | [](https://circleci.com/gh/plotly/orca) | [](https://travis-ci.org/plotly/orca) | [](https://ci.appveyor.com/project/AppVeyorDashAdmin/image-exporter) | | ||
| | Tests and Linux builds | Mac OS build | Windows build | Docker build | | ||
| | --- | --- | --- | --- | | ||
| | [](https://circleci.com/gh/plotly/orca) | [](https://travis-ci.org/plotly/orca) | [](https://ci.appveyor.com/project/AppVeyorDashAdmin/image-exporter) | [](https://quay.io/repository/plotly/orca) | | ||
|
|
||
|
|
||
| ## License | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE policymap [ | ||
| <!ELEMENT policymap (policy)+> | ||
| <!ELEMENT policy (#PCDATA)> | ||
| <!ATTLIST policy domain (delegate|coder|filter|path|resource) #IMPLIED> | ||
| <!ATTLIST policy name CDATA #IMPLIED> | ||
| <!ATTLIST policy rights CDATA #IMPLIED> | ||
| <!ATTLIST policy pattern CDATA #IMPLIED> | ||
| <!ATTLIST policy value CDATA #IMPLIED> | ||
| ]> | ||
| <!-- | ||
| Configure ImageMagick policies. | ||
|
|
||
| Domains include system, delegate, coder, filter, path, or resource. | ||
|
|
||
| Rights include none, read, write, and execute. Use | to combine them, | ||
| for example: "read | write" to permit read from, or write to, a path. | ||
|
|
||
| Use a glob expression as a pattern. | ||
|
|
||
| Suppose we do not want users to process MPEG video images: | ||
|
|
||
| <policy domain="delegate" rights="none" pattern="mpeg:decode" /> | ||
|
|
||
| Here we do not want users reading images from HTTP: | ||
|
|
||
| <policy domain="coder" rights="none" pattern="HTTP" /> | ||
|
|
||
| Lets prevent users from executing any image filters: | ||
|
|
||
| <policy domain="filter" rights="none" pattern="*" /> | ||
|
|
||
| The /repository file system is restricted to read only. We use a glob | ||
| expression to match all paths that start with /repository: | ||
|
|
||
| <policy domain="path" rights="read" pattern="/repository/*" /> | ||
|
|
||
| Any large image is cached to disk rather than memory: | ||
|
|
||
| <policy domain="resource" name="area" value="1GB"/> | ||
|
|
||
| Define arguments for the memory, map, area, and disk resources with | ||
| SI prefixes (.e.g 100MB). In addition, resource policies are maximums for | ||
| each instance of ImageMagick (e.g. policy memory limit 1GB, -limit 2GB | ||
| exceeds policy maximum so memory limit is 1GB). | ||
| --> | ||
| <policymap> | ||
| <!-- <policy domain="resource" name="temporary-path" value="/tmp"/> --> | ||
| <!-- <policy domain="resource" name="memory" value="2GiB"/> --> | ||
| <!-- <policy domain="resource" name="map" value="4GiB"/> --> | ||
| <!-- <policy domain="resource" name="area" value="1GB"/> --> | ||
| <!-- <policy domain="resource" name="disk" value="16EB"/> --> | ||
| <!-- <policy domain="resource" name="file" value="768"/> --> | ||
| <!-- <policy domain="resource" name="thread" value="4"/> --> | ||
| <!-- <policy domain="resource" name="throttle" value="0"/> --> | ||
| <!-- <policy domain="resource" name="time" value="3600"/> --> | ||
| <!-- <policy domain="system" name="precision" value="6"/> --> | ||
| <!-- <policy domain="cache" name="shared-secret" value="passphrase"/> --> | ||
|
|
||
| <policy domain="path" rights="none" pattern="@*" /> | ||
| <!-- | ||
| <policy domain="coder" rights="none" pattern="EPHEMERAL" /> | ||
| <policy domain="coder" rights="none" pattern="URL" /> | ||
| <policy domain="coder" rights="none" pattern="HTTPS" /> | ||
| <policy domain="coder" rights="none" pattern="MVG" /> | ||
| <policy domain="coder" rights="none" pattern="MSL" /> | ||
| <policy domain="coder" rights="none" pattern="TEXT" /> | ||
| <policy domain="coder" rights="none" pattern="SHOW" /> | ||
| <policy domain="coder" rights="none" pattern="WIN" /> | ||
| <policy domain="coder" rights="none" pattern="PLT" /> | ||
| --> | ||
|
|
||
| <!-- disable ghostscript format types --> | ||
| <!-- | ||
| <policy domain="coder" rights="none" pattern="PS" /> | ||
| <policy domain="coder" rights="none" pattern="EPS" /> | ||
| <policy domain="coder" rights="none" pattern="PDF" /> | ||
| <policy domain="coder" rights="none" pattern="XPS" /> | ||
| --> | ||
| <policy domain="coder" rights="read|write" pattern="*" /> | ||
|
|
||
| </policymap> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| if [[ $1 == "--help" || $1 == "--version" || $1 == "graph" ]]; then | ||
| xvfb-run --server-args "-screen 0 640x480x24" -a /var/www/image-exporter/bin/orca.js "$@" | ||
| elif [[ $1 == "serve" ]]; then | ||
| shift 1 # Remove argument "serve" since it is assumed in the following | ||
| /run_server "$@" | ||
| else # By default, run the server | ||
| /run_server "$@" | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.