Skip to content
Permalink
Browse files

Add Distillery.

  • Loading branch information...
olefav committed Jun 27, 2019
1 parent 4df877e commit 88551f7dbb04cecc40f3ae30125068a7d95d3642
Showing with 93 additions and 2 deletions.
  1. +1 −2 mix.exs
  2. +4 −0 mix.lock
  3. +55 −0 rel/config.exs
  4. +3 −0 rel/plugins/.gitignore
  5. +30 −0 rel/vm.args
@@ -21,8 +21,7 @@ defmodule ClusterDemo.MixProject do
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# {:dep_from_hexpm, "~> 0.3.0"},
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
{:distillery, "~> 2.0"}
]
end
end
@@ -0,0 +1,4 @@
%{
"artificery": {:hex, :artificery, "0.4.2", "3ded6e29e13113af52811c72f414d1e88f711410cac1b619ab3a2666bbd7efd4", [:mix], [], "hexpm"},
"distillery": {:hex, :distillery, "2.1.0", "5f31c7771923c12dbb79dcd8d01c5913b07222f134c327e7ab026acdabae985b", [:mix], [{:artificery, "~> 0.2", [hex: :artificery, repo: "hexpm", optional: false]}], "hexpm"},
}
@@ -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: :"UE~wv8KP$PP)/6xwj`lGew7bT^Kj4g^5EWZQSh;umsgHkFr~c7j2yUYgL2IK>_>M"
end

environment :prod do
set include_erts: true
set include_src: false
set cookie: :"]~enlGbLL2z_DVkjpyFgSkP9mv`KN5bFKF&hIQ_r}@5B5VE_5wS@7GR(?(n4WHv?"
set vm_args: "rel/vm.args"
end

# You may define one or more releases in this file.
# If you have not set a default release, or selected one
# when running `mix distillery.release`, the first release in the file
# will be used by default

release :cluster_demo do
set version: current_version(:cluster_demo)
set applications: [
:runtime_tools
]
end

@@ -0,0 +1,3 @@
*.*
!*.exs
!.gitignore
@@ -0,0 +1,30 @@
## This file provide the arguments provided to the VM at startup
## You can find a full list of flags and their behaviours at
## http://erlang.org/doc/man/erl.html

## Name of the node
-name <%= release_name %>@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

0 comments on commit 88551f7

Please sign in to comment.
You can’t perform that action at this time.