Xamal.Commands.Builder (xamal v0.3.1)

Copy Markdown View Source

Build commands: mix release, tarball creation, SCP distribution.

Summary

Functions

Build the release inside a Docker container for cross-compilation.

Build the release locally with mix release.

Create a tarball from the built release.

Upload the tarball to a remote host and unpack it.

SCP command to upload tarball to a host.

The tarball filename.

The local tarball path.

Unpack the tarball on the remote host.

Upload the env file for a role to the remote host.

Functions

build_in_docker(config)

Build the release inside a Docker container for cross-compilation.

The Docker image can be configured via builder.docker in config/xamal.exs:

  • docker: true uses a default hexpm/elixir image
  • docker: "image:tag" uses the specified image

Builder args from builder.args are passed as environment variables via -e flags.

build_release(config)

Build the release locally with mix release.

create_tarball(config)

Create a tarball from the built release.

deploy_to_host(config)

Upload the tarball to a remote host and unpack it.

scp_tarball(config, host, ssh_config)

SCP command to upload tarball to a host.

tarball_name(config)

The tarball filename.

tarball_path(config)

The local tarball path.

unpack_tarball(config)

Unpack the tarball on the remote host.

upload_env_file(config, role)

Upload the env file for a role to the remote host.