diff --git a/mix.exs b/mix.exs index 3ab0dc2..54d794f 100644 --- a/mix.exs +++ b/mix.exs @@ -39,6 +39,7 @@ defmodule Chess.Mixfile do {:comeonin, "~> 4.0"}, {:cowboy, "~> 1.0"}, {:credo, "~> 1.0", only: [:dev, :test]}, + {:distillery, "~> 2.1", runtime: false}, {:formulator, "~> 0.1.6"}, {:gettext, "~> 0.16.0"}, {:guardian, "~> 1.0"}, diff --git a/rel/config.exs b/rel/config.exs new file mode 100644 index 0000000..b8c84b8 --- /dev/null +++ b/rel/config.exs @@ -0,0 +1,55 @@ +# Import all plugins from `rel/plugins` +# They can then be used by adding `plugin MyPlugin` to +# either an environment, or release definition, where +# `MyPlugin` is the name of the plugin module. +~w(rel plugins *.exs) +|> Path.join() +|> Path.wildcard() +|> Enum.map(&Code.eval_file(&1)) + +use Distillery.Releases.Config, + # This sets the default release built by `mix distillery.release` + default_release: :default, + # This sets the default environment used by `mix distillery.release` + default_environment: Mix.env() + +# For a full list of config options for both releases +# and environments, visit https://hexdocs.pm/distillery/config/distillery.html + + +# You may define one or more environments in this file, +# an environment's settings will override those of a release +# when building in that environment, this combination of release +# and environment configuration is called a profile + +environment :dev do + # If you are running Phoenix, you should make sure that + # server: true is set and the code reloader is disabled, + # even in dev mode. + # It is recommended that you build with MIX_ENV=prod and pass + # the --env flag to Distillery explicitly if you want to use + # dev mode. + set dev_mode: true + set include_erts: false + set cookie: :"CK%$*pAXF%$X]|ceC%xi:QDqt_${^0@ZyUOv}dp4Ld9{WH7h*JMxJ&V;50V~CY@127.0.0.1 + +## Cookie for distributed erlang +-setcookie <%= release.profile.cookie %> + +## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive +## (Disabled by default..use with caution!) +##-heart + +## Enable kernel poll and a few async threads +##+K true +##+A 5 +## For OTP21+, the +A flag is not used anymore, +## +SDio replace it to use dirty schedulers +##+SDio 5 + +## Increase number of concurrent ports/sockets +##-env ERL_MAX_PORTS 4096 + +## Tweak GC to run more often +##-env ERL_FULLSWEEP_AFTER 10 + +# Enable SMP automatically based on availability +# On OTP21+, this is not needed anymore. +-smp auto