Xamal.Commands.App (xamal v0.3.0)

Copy Markdown View Source

Release lifecycle commands: start, stop, status, version, exec, logs.

Summary

Functions

Get the running release version by reading the current symlink.

Show details about the running release.

Execute an arbitrary command within the release environment.

Execute a command in the context of the running release.

List all release directories.

Get logs via journalctl for the release service. Uses systemd journal since we run as a daemon.

Remove a specific release directory.

Check if the release is running (pid check).

List stale (non-current) releases.

Start the release as a daemon on a given port.

Start a specific release version on a given port.

Stop the running release.

Stop a specific release version.

Functions

current_version(config)

Get the running release version by reading the current symlink.

details(config, port \\ nil)

Show details about the running release.

eval(config, expression)

Execute an arbitrary command within the release environment.

exec(config, command, opts \\ [])

Execute a command in the context of the running release.

Uses bin/<app> rpc for non-interactive, bin/<app> remote for interactive.

list_releases(config)

List all release directories.

logs(config, opts \\ [])

Get logs via journalctl for the release service. Uses systemd journal since we run as a daemon.

remove_release(config, version)

Remove a specific release directory.

running?(config, port \\ nil)

Check if the release is running (pid check).

stale_releases(config, keep)

List stale (non-current) releases.

start(config, role, port)

Start the release as a daemon on a given port.

Sources the role env file, sets PORT, then runs bin/<app> daemon.

start_version(config, role, version, port)

Start a specific release version on a given port.

stop(config, port \\ nil)

Stop the running release.

stop_version(config, version, port \\ nil)

Stop a specific release version.