Issues when deploying on self-hosted Coolify #118
CodeGradox
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Today I tested deploying my rails app running ferrum_pdf with Coolify. Deploying Rails went fine with nixpacks, but then I realized that I also had to add a browserless/chrome service for ferrum to work. It took a few hours for me to figure it out, because ferrum was unable to connect to the browserless service.
With the help of AI, I was able to make it work.
The AI had to monkey patch the Ferrum::Client::Websocket initializer. Without it, I was getting an SSL error. I have very little knowledge about the inner workings of SSL, so I don't know it it's due to Coolify running with a Caddy proxy behind a Cloudflare Proxied DNS. 😬
Secondly, I realized that setting ws_url in the
FerrumPdfconfig did not have any effect. I find this weird, since the source code looked like it simply passed all config options to aFerrum::Browserinitializer. In the end, I had to create my own Ferrum::Browser instance in the controller which I then passed toFerrumPdf.render_pdf.Using
urlinstead ofws_urlgave me this error:And my ws_url looks something like this:
wss://<domain>?token=<token>. For theurlvariable I usedhttps.My current ferrum_pdf.rb initializer looks like this:
It's not ideal, but it works! It seems a bit... hacky?
Specs
Beta Was this translation helpful? Give feedback.
All reactions