Add our own OTP release configuration

This commit is contained in:
Timothée Floure 2022-01-25 10:52:07 +01:00
parent 50326536b1
commit f21b48eadf
Signed by: tfloure
GPG key ID: 4502C902C00A1E12
2 changed files with 16 additions and 6 deletions

17
mix.exs
View file

@ -7,7 +7,8 @@ defmodule HAHandler.MixProject do
version: "0.1.0",
elixir: "~> 1.12",
start_permanent: Mix.env() == :prod,
deps: deps()
deps: deps(),
releases: releases()
]
end
@ -28,4 +29,18 @@ defmodule HAHandler.MixProject do
{:poison, "~> 5.0"}
]
end
# See https://hexdocs.pm/mix/Mix.Tasks.Release.html for details.
defp releases do
[
ha_handler: [
include_executables_for: [:unix],
applications: [runtime_tools: :permanent],
include_erts: true,
config_providers: [
{Config.Reader, {:system, "HA_HANDLER_CONFIG_DIR", "config.exs"}}
]
]
]
end
end

View file

@ -1,5 +0,0 @@
@echo off
rem Set the release to work across nodes.
rem RELEASE_DISTRIBUTION must be "sname" (local), "name" (distributed) or "none".
rem set RELEASE_DISTRIBUTION=name
rem set RELEASE_NODE=<%= @release.name %>