Hi all, I’m new to Elixir. I’m trying to use distillery (~> 0.10) + edeliver (~> 1.4.0) for a practice throwaway Phoenix app but it won’t start at production.
Manually running “bin/<project_name> start” at production works beautifully.
But most of the time “mix edeliver start production” does not. Occasionaly I get a blank response line but every so often, seemingly randomly, it will return “ok” and it works.
I found this error message in var/log/erlang.log.1
could not start kernel pid (application_controller) (error in config file “/home/holydoctrine/blah/blah/var/sys.config” (none): configuration file must contain ONE list ended by <dot>)
Any idea as to what is going on? Here is my config - it is barebones and vanilla.
/home/holydoctrine/blah/blah/var/sys.config:
%% Generated - edit/create /home/holydoctrine/blah/blah/sys.config instead.
[{sasl,[{errlog_type,error}]},
{logger,
[{console,
[{format,<<"$time $metadata[$level] $message\n">>},
{metadata,[request_id]}]},
{level,info}]},
{blah,
[{'Elixir.Blah.Endpoint',
[{url,[{host,<<"localhost">>}]},
{render_errors,
[{view,'Elixir.Blah.ErrorView'},
{accepts,[<<"html">>,<<"json">>]}]},
{pubsub,
[{name,'Elixir.Blah.PubSub'},
{adapter,'Elixir.Phoenix.PubSub.PG2'}]},
{http,[{port,4000}]},
{cache_static_manifest,<<"priv/static/manifest.json">>},
{server,true},
{root,<<".">>},
{version,<<"0.0.1+20161209-11-037d63e">>},
{secret_key_base,
<<"S12G92uMyvs9gCXA437fGCejbXQ4nt53yuW2RvVQsIQPgNBci8TrmS4VZS/xZAGY">>}]}]}].
.deliver/config:
#!/usr/bin/env bash
APP="blah"
BUILD_HOST="localhost"
BUILD_USER="vagrant"
BUILD_AT="/tmp/edeliver/blah/builds"
PRODUCTION_HOSTS="<domain_name>"
PRODUCTION_USER="holydoctrine"
DELIVER_TO="/home/holydoctrine/blah"
AUTO_VERSION="build-date+git-commit-count-branch+git-revision"
pre_erlang_clean_compile() {
status "Running phoenix.digest" # log output prepended with "----->"
__sync_remote " # runs the commands on the build host
[ -f ~/.profile ] && source ~/.profile # load profile (optional)
set -e # fail if any command fails (recommended)
cd '$BUILD_AT' # enter the build directory on the build host (required)
# prepare something
mkdir -p priv/static # required by the phoenix.digest task
# run your custom task
npm install
./node_modules/brunch/bin/brunch b -p
APP='$APP' MIX_ENV='$TARGET_MIX_ENV' $MIX_CMD phoenix.digest $SILENCE
"
}
.rel/config.exs:
use Mix.Releases.Config,
default_release: :default,
default_environment: :dev
environment :dev do
set dev_mode: true
set include_erts: false
set cookie: :"7-zZM,KCNUs0NgZ?!oZE1|E`]lZ[<^(B*t4{AvKE4w[H3gm:8D[+l7mT(S.qM5tc"
end
environment :prod do
set include_erts: true
set include_src: false
set cookie: :"7-zZM,KCNUs0NgZ?!oZE1|E`]lZ[<^(B*t4{AvKE4w[H3gm:8D[+l7mT(S.qM5tc"
end
release :blah do
set version: current_version(:blah)
end