From 3d374bf7df6a5cc4bacefefcb133387fe4c5265f Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 8 Jun 2019 17:15:49 +0300 Subject: [PATCH] Basic release skeleton --- config/releases.exs | 1 + rel/env.sh.eex | 12 ++++++++++++ rel/pleroma_ctl | 5 +++++ rel/vm.args.eex | 11 +++++++++++ 4 files changed, 29 insertions(+) create mode 100644 config/releases.exs create mode 100644 rel/env.sh.eex create mode 100755 rel/pleroma_ctl create mode 100644 rel/vm.args.eex diff --git a/config/releases.exs b/config/releases.exs new file mode 100644 index 000000000..becde7693 --- /dev/null +++ b/config/releases.exs @@ -0,0 +1 @@ +import Config diff --git a/rel/env.sh.eex b/rel/env.sh.eex new file mode 100644 index 000000000..a4ce25295 --- /dev/null +++ b/rel/env.sh.eex @@ -0,0 +1,12 @@ +#!/bin/sh + +# Sets and enables heart (recommended only in daemon mode) +# if [ "$RELEASE_COMMAND" = "daemon" ] || [ "$RELEASE_COMMAND" = "daemon_iex" ]; then +# HEART_COMMAND="$RELEASE_ROOT/bin/$RELEASE_NAME $RELEASE_COMMAND" +# export HEART_COMMAND +# export ELIXIR_ERL_OPTIONS="-heart" +# fi + +# Set the release to work across nodes +export RELEASE_DISTRIBUTION=name +export RELEASE_NODE=<%= @release.name %>@127.0.0.1 diff --git a/rel/pleroma_ctl b/rel/pleroma_ctl new file mode 100755 index 000000000..543b742b9 --- /dev/null +++ b/rel/pleroma_ctl @@ -0,0 +1,5 @@ +#!/bin/sh +# XXX: This should be removed when elixir's releases get custom command support +SCRIPT=$(readlink -f "$0") +SCRIPTPATH=$(dirname "$SCRIPT") +$SCRIPTPATH/pleroma eval 'Pleroma.ReleaseTasks.mix_task("'"$*"'")' diff --git a/rel/vm.args.eex b/rel/vm.args.eex new file mode 100644 index 000000000..71e803264 --- /dev/null +++ b/rel/vm.args.eex @@ -0,0 +1,11 @@ +## 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