Socketelx.Application (socketelx v0.2.0)

Copy Markdown View Source

OTP application callback — only relevant when this project is compiled and released as its own standalone deployment (the Docker image). When socketelx is instead pulled in as a hex dependency of another app, this starts an empty supervisor and does nothing: the host app is expected to add {Socketelx, opts} to its own supervision tree explicitly (see Socketelx's moduledoc).

The distinction is made via config :socketelx, :standalone?, which is set to true only in this project's own config/runtime.exs. A dependency's config/runtime.exs is not evaluated when building someone else's release, so this stays false (the safe default) for anyone who adds this as a dependency.