Skip to content

Commit

Permalink
update to Chrome 74
Browse files Browse the repository at this point in the history
- the CL https://chromium-review.googlesource.com/c/chromium/src/+/952522
  introduced a security check which makes it necessary to access the
  chrome containers with IP addresses.
  The --hosts parameter resolves the given hosts and constructs URLs.

fixed a few silly bugs concerning the parameter handling
  • Loading branch information
martint17r committed Mar 20, 2019
1 parent 17651cf commit 117c5e3
Show file tree
Hide file tree
Showing 1,425 changed files with 327,010 additions and 134,855 deletions.
50 changes: 50 additions & 0 deletions 27187-pos2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions 27187-pos3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.9.1 as builder
FROM golang:1.12 as builder
ADD . /go/src/github.com/vitraum/svg2png
RUN CGO_ENABLED=0 go build -tags netgo -ldflags "-s -w -extldflags '-static'" -o /go/bin/svg2png github.com/vitraum/svg2png

Expand Down
125 changes: 108 additions & 17 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@

[[constraint]]
branch = "master"
name = "github.com/knq/chromedp"
name = "github.com/chromedp/chromedp"
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

docker-compose up --build --remove-orphans

curl -d @test.svg http://localhost:8001/api/v1/proxy/namespaces/admin/services/svg2png:80/v1/png > test.png
# TEST

curl -d @test.svg http://localhost:8544/v1/png > test.png

# TODO

Split chrome runners into seperate pods to enable autoscaling
-> needs support for a resizable, remote pool, not included in knq/chromedp
-> needs support for a resizable, remote pool, not included in chromedp/chromedp
33 changes: 16 additions & 17 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,28 @@ services:
ports:
- "8544:8544"
environment:
- SVG2PNG_URL=http://chrome0:9223/json,http://chrome1:9222/json,http://chrome2:9222/json,http://chrome3:9222/json
- SVG2PNG_HOSTS=chrome0,chrome1,chrome2,chrome3
- SVG2PNG_TIMEOUT=30
- SVG2PNG_SELF=svg2png
chrome0:
#image: knqz/chrome-headless:61.0.3114.2
image: yukinying/chrome-headless:61.0.3163.2
entrypoint:
- /chrome/headless_shell
- --no-sandbox
- --hide-scrollbars
- --remote-debugging-address=0.0.0.0
- --remote-debugging-port=9223
ports:
- "9223:9223"
image: yukinying/chrome-headless-browser:74.0.3729.6
command: --no-sandbox --disable-gpu
expose:
- "9222"
chrome1:
image: yukinying/chrome-headless:61.0.3163.2
ports:
- "9222:9222"
image: yukinying/chrome-headless-browser:74.0.3729.6
command: --no-sandbox --disable-gpu
expose:
- "9222"
chrome2:
image: yukinying/chrome-headless:61.0.3163.2
image: yukinying/chrome-headless-browser:74.0.3729.6
command: --no-sandbox --disable-gpu
expose:
- "9222"
chrome3:
image: yukinying/chrome-headless:61.0.3163.2
image: yukinying/chrome-headless-browser:74.0.3729.6
command: --no-sandbox --disable-gpu --remote-debugging-address=0.0.0.0
expose:
- "9222"
# bash:
# image: debian
# entrypoint: /bin/sleep 10000
Loading

0 comments on commit 117c5e3

Please sign in to comment.