UpstatePhoenix (upstate_phoenix v0.1.1)

Copy Markdown View Source

Phoenix app health for Upstate.

Mount UpstatePhoenix.Plug in your endpoint. Upstate's host observer reads GET /upstate/health from inside your server, over the private Docker network, every minute. The package sends nothing anywhere by itself.

See UpstatePhoenix.Plug for options and the README for what is (and is never) sent.

Summary

Functions

True for localhost and private IPv4/IPv6 literals (10/8, 172.16/12, 192.168/16, 127/8, fc00::/7, ::1).

The package version, reported as reporter.version.

Functions

private_host?(host)

True for localhost and private IPv4/IPv6 literals (10/8, 172.16/12, 192.168/16, 127/8, fc00::/7, ::1).

For Plug older than 1.19, whose Plug.SSL :exclude option takes only hosts, use it to keep force_ssl from redirecting the observer's plain-HTTP request to the container's private IP:

force_ssl: [rewrite_on: [:x_forwarded_proto], exclude: {UpstatePhoenix, :private_host?, []}]

On Plug 1.19+ prefer exclude: [hosts: ["localhost", "127.0.0.1"], paths: ["/upstate/health"]].

version()

The package version, reported as reporter.version.