Xamal.AppTasks (xamal v0.3.1)

Copy Markdown View Source

Application task implementations.

Summary

Functions

Opens an interactive remote IEx session connected to the running release.

Runs the release migrator on the selected hosts.

Splits exec args into {exec_opts, command}.

Lists releases that would be removed by pruning (a read-only preview).

Starts the systemd service on the currently active port without a full boot.

Prints the current release version on the selected hosts.

Functions

boot(args, opts, context)

exec(args, opts, context)

iex(args, opts, context)

Opens an interactive remote IEx session connected to the running release.

Convenience wrapper for mix xamal.app.exec -i, connecting via the release's remote command.

live(args, opts, context)

logs(args, opts, context)

maintenance(args, opts, context)

migrate(args, opts, context)

Runs the release migrator on the selected hosts.

Calls <AppModule>.Release.migrate() via the release's RPC, following the conventional mix phx.gen.release-style Release module. Override the module by passing it as an argument, e.g. mix xamal.migrate MyApp.Release.

parse_exec(args)

@spec parse_exec([String.t()]) :: {keyword(), String.t()}

Splits exec args into {exec_opts, command}.

-i/--interactive may lead; everything after it is the command verbatim, so a command that itself contains dashed tokens keeps them intact. Public for testing; not part of the API.

stale_releases(args, opts, context)

Lists releases that would be removed by pruning (a read-only preview).

mix xamal.prune performs the actual removal.

start(args, opts, context)

Starts the systemd service on the currently active port without a full boot.

Use this to bring an app back up after mix xamal.app.stop; mix xamal.app.boot performs the heavier zero-downtime swap instead.

stop(args, opts, context)

version(args, opts, context)

Prints the current release version on the selected hosts.

See also mix xamal.versions, which lists every release and marks the current one.