bitcrowd / chromic_pdf

Convenient HTML to PDF/A rendering library for Elixir based on Chrome & Ghostscript
Apache License 2.0
422 stars 38 forks source link

Recent versions of chromium do not support --remote-debugging-address #327

Open MaeIsBad opened 3 months ago

MaeIsBad commented 3 months ago

Recent chrome versions only listen on 127.0.0.1(https://issues.chromium.org/issues/41487252)

In order to access chrome from another machine you need to proxy your traffic through something like socat.

For container use cases you need to ensure you're running in the same namespace, so using the same k8s pod, or by using the network_mode option in docker-compose

version: "3"

services:
  chromic_pdf:
    build:
      context: .
    depends_on:
      - browser
  browser:
   network_mode: "service:chromic_pdf"
   image: chrome

In order to avoid running into cyclic dependency issues you might want to use a pause container to create a network namespace, replicating how k8s pods work

maltoe commented 2 months ago

@MaeIsBad thank you for the info! Any chance you can add this as another callout or section in the docs here?