Browse Source

add distillery config

master
Inhji Y. 1 year ago
parent
commit
43c2a111b1
  1. 4
      .gitignore
  2. 2
      .version
  3. 55
      rel/config.exs
  4. 6
      rel/env.bat.eex
  5. 18
      rel/env.sh.eex
  6. 3
      rel/plugins/.gitignore
  7. 30
      rel/vm.args
  8. 11
      rel/vm.args.eex

4
.gitignore

@ -35,4 +35,6 @@ npm-debug.log
/uploads/
/log/
/log/
.version

2
.version

@ -1 +1 @@
0.1.0
0.1.1

55
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: :"zA<6^J<Y|Ovw(Wiq3.>Gwc9OB74>~i7x!1IGtTO=xd:k?/F5&*X4MwoMA%eBl*VF"
end
environment :prod do
set include_erts: true
set include_src: false
set cookie: :"gOzpB.tlr6i5W0<AvyGyjtIpT}!}[m:{uR9il5FXo=Di^<5Cwhh]rcdj;y7A8G=s"
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 :dagon do
set version: current_version(:dagon)
set applications: [
:runtime_tools
]
end

6
rel/env.bat.eex

@ -1,6 +0,0 @@
@echo off
rem Set the release to work across nodes. If using the long name format like
rem the one below (my_app@127.0.0.1), you need to also uncomment the
rem RELEASE_DISTRIBUTION variable below.
rem set RELEASE_DISTRIBUTION=name
rem set RELEASE_NODE=<%= @release.name %>@127.0.0.1

18
rel/env.sh.eex

@ -1,18 +0,0 @@
#!/bin/sh
# Sets and enables heart (recommended only in daemon mode)
# case $RELEASE_COMMAND in
# daemon*)
# HEART_COMMAND="$RELEASE_ROOT/bin/$RELEASE_NAME $RELEASE_COMMAND"
# export HEART_COMMAND
# export ELIXIR_ERL_OPTIONS="-heart"
# ;;
# *)
# ;;
# esac
# Set the release to work across nodes. If using the long name format like
# the one below (my_app@127.0.0.1), you need to also uncomment the
# RELEASE_DISTRIBUTION variable below.
# export RELEASE_DISTRIBUTION=name
# export RELEASE_NODE=<%= @release.name %>@127.0.0.1

3
rel/plugins/.gitignore

@ -0,0 +1,3 @@
*.*
!*.exs
!.gitignore

30
rel/vm.args

@ -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

11
rel/vm.args.eex

@ -1,11 +0,0 @@
## Customize flags given to the VM: http://erlang.org/doc/man/erl.html
## -mode/-name/-sname/-setcookie are configured via env vars, do not set them here
## Number of dirty schedulers doing IO work (file, sockets, etc)
##+SDio 5
## Increase number of concurrent ports/sockets
##+Q 65536
## Tweak GC to run more often
##-env ERL_FULLSWEEP_AFTER 10
Loading…
Cancel
Save