You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add edeliver dependency (pointing to master branch on GH for now...): {:edeliver, git: "https://github.com/boldpoker/edeliver.git"}
change {:phoenix_live_reload, "~> 1.0", only: :dev} to {:phoenix_live_reload, "~> 1.0"}
add , :edeliver, :phoenix_live_reload to applications list
mix deps.get
mix deps.compile
create .deliver/config file
populate config file with the following:
#!/usr/bin/env bash
APP="my_awesome_app" # name of your release
BUILD_HOST="server ip / hostname" # host where to build the release
BUILD_USER="root" # local user at build host
BUILD_AT="/git/my_awesome_app/builds" # build directory on build host
RELEASE_DIR="/git/my_awesome_app/builds/rel/my_awesome_app"
RELEASE_VERSION=0.0.1
STAGING_HOSTS="server ip / hostname" # staging / test hosts separated by space
STAGING_USER="git" # local user at staging hosts
TEST_AT="/test/my_awesome_app" # deploy directory on staging hosts. default is DELIVER_TO
PRODUCTION_HOSTS="server ip / hostname" # deploy / production hosts separated by space
PRODUCTION_USER="root" # local user at deploy hosts
DELIVER_TO="/opt/my_awesome_app" # deploy directory on production hosts
Actually you can omit the RELEASE_VERSION="x.y.z" in the edeliver config. edeliver autodetects the current release version when building. Then you would not have to change the version in two files, if it is incremented: only in mix.exs, not in .deliver/config.
If you don't like to increment the version at all every time you build/deploy a new release but still want to be able to identify the deployed version, you can test the new --auto-version=gitfeature from the upgrade-command branch which will be included into the next major edeliver release (1.2). This option causes edeliver to append the git hash to the release version when building the release or upgrade. To enable it permanently you can add the AUTO_RELEASE_VERSION=git option to the edeliver config.
Btw, if you want to use different configurations per host or just don't want to include the production config into the release file, the LINK_SYS_CONFIG=/path/ or the LINK_VM_ARGS=/path/option might be helpful.
Actually you can omit the
RELEASE_VERSION="x.y.z"
in the edeliver config. edeliver autodetects the current release version when building. Then you would not have to change the version in two files, if it is incremented: only inmix.exs
, not in.deliver/config
.If you don't like to increment the version at all every time you build/deploy a new release but still want to be able to identify the deployed version, you can test the new
--auto-version=git
feature from theupgrade-command
branch which will be included into the next major edeliver release (1.2). This option causes edeliver to append the git hash to the release version when building the release or upgrade. To enable it permanently you can add theAUTO_RELEASE_VERSION=git
option to the edeliver config.Btw, if you want to use different configurations per host or just don't want to include the production config into the release file, the
LINK_SYS_CONFIG=/path/
or theLINK_VM_ARGS=/path/
option might be helpful.