Hi! I use edeliver to deploy my umbrella app to production, and finally it works when I deploy releases and start them, but mix edeliver stop production
command doesn’t work, so I need to stop my app manually by killing the process which is ugly of course.
Command ./bin/myapp stop
on remote server doesn’t work too.
Had anybody had such an issue? Or what may be going on here?
My .deliver/config looks like:
APP="myapp"
BUILD_HOST="localhost"
BUILD_USER="builder"
BUILD_AT="/tmp/edeliver/myapp-ex/builds"
PRODUCTION_HOSTS="myip"
PRODUCTION_USER="myapp"
DELIVER_TO="/home/myapp/apps/myapp-ex"
RELEASE_DIR="$BUILD_AT/_build/$TARGET_MIX_ENV/rel/$APP"
GIT_CLEAN_PATHS=${GIT_CLEAN_PATHS:="rel"}
pre_erlang_get_and_update_deps() {
status "Linking to prod.secret.exs replacement config"
local _secret_path="/home/builder/config/prod.secret.exs"
if [ "$TARGET_MIX_ENV" = "prod" ]; then
status "Linking to prod.secret.exs replacement config: TARGET_MIX_ENV=prod"
set output_dir: "rel/myapp_ex"
__sync_remote "
ln -sfn '$_secret_path' '$BUILD_AT/apps/myapp/config/prod.secret.exs'
"
fi
}
and disltillery config
Path.join(["rel", "plugins", "*.exs"])
|> Path.wildcard()
|> Enum.map(&Code.eval_file(&1))
use Mix.Releases.Config,
# This sets the default release built by `mix release`
default_release: :default,
# This sets the default environment used by `mix release`
default_environment: Mix.env()
environment :dev do
set dev_mode: true
set include_erts: false
set cookie: :"KMtZQ:n?.1$e^zIvWNrp2o8cLrOaXA:fOcazo|P>@3TZ5tID0b)Outxl]5PtG%e?"
end
environment :prod do
set include_erts: true
set include_src: false
set cookie: :"klkjdfsldfsdflkjk"
end
release :myapp do
set version: current_version(:myapp)
set applications: [
:myapp
]
end