shotleybuilder

shotleybuilder OP

Ha, ha, just when you thought it was safe … Gigalixir logs have gone a little bit daft. Failing health checks on port 4000 although I’ve moved to using url: [host: "my-app-name.gigalixirapp.com", port: 4000]

I’m going to write to Gigalixir and ask them for the vanilla mix config set-up guaranteed to work and support path helpers. I’ll copy their reply here.

0
Post #11
LostKobrakai

LostKobrakai

You don’t want port 4000 for the url, but 80 or 443 depending on if you use http or https.

:url is the config used only for url generation. Ports for urls look like this: example.com:4000 unless the scheme is http and the port 80 or the scheme https and the port 443, when the port is skipped.

All this is completely separate from configuring where phoenix listens on incoming requests, which is configured on the :http/:https key. Here you want to set the port to something gigalixir routes requests to.

1
Post #12
shotleybuilder

shotleybuilder OP

I was just in the process of trying 80 (having tried 443 last night). The logs just kept complaining that Your app is failing health checks, which means it isn't listening on port 4000 which confused me - not hard admittedly.

80 is working. The generated urls don’t show the port number even though the app is served through https.

0
Post #13
LostKobrakai

LostKobrakai

That error is about the listening port though, therefore completely unrelated with how you configure :url.

0
Post #14
shotleybuilder

shotleybuilder OP

Yeah, the app has been deployed and working for a while, it was just touching the url config that was causing the probs. This seems to have fixed it. Very simple, but not in the Gigalixir docs nor any tutorial that I’ve been able to find. No doubt I will find the very instruction in hindsight - everything is so blindingly obvious then :slight_smile:

1
Post #15
van-mronov

van-mronov

Hey, I have the same problem with Gigalixir :slightly_smiling_face:
Your app is failing health checks, which means it isn't listening on port 4000

How did you handle it? Add any healthcheck endpoint?
I could find anything related in Gigalixir docs too :slightly_smiling_face:

0
Post #16
— All posts loaded —