# Update using edeliver

**URL:** <https://forum.elixirforum.com/t/update-using-edeliver/27504>\
**Category:** Questions\
**Tags:** edeliver, deployment\
**Created:** [December 11, 2019, 9:09am UTC](https://forum.elixirforum.com/t/update-using-edeliver/27504 "2019-12-11T09:09:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![azimlord](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/azimlord/32/14403_2.png) [@azimlord](https://forum.elixirforum.com/u/azimlord)\
**Post date:** [December 11, 2019, 9:11am UTC](https://forum.elixirforum.com/t/update-using-edeliver/27504/2 "2019-12-11T09:11:16Z")

</div>

Here are my `.deliver/config` file in case anyone need it

```elixir
APP="my_app"

BUILD_HOST="[MY_IP_HERE]"
BUILD_USER="deploy"
BUILD_AT="/tmp/edeliver/$APP/builds"

START_DEPLOY=true
CLEAN_DEPLOY=true

# prevent re-installing node modules; this defaults to "."
GIT_CLEAN_PATHS="_build rel priv/static"

PRODUCTION_HOSTS=""
PRODUCTION_USER=""

STAGING_HOSTS="[MY_IP_HERE]"
STAGING_USER="deploy"

DELIVER_TO="/home/deploy/apps"
# AUTO_VERSION=revision

# For Phoenix projects, symlink prod.secret.exs to our tmp source
pre_erlang_get_and_update_deps() {
  local _prod_secret_path="/home/deploy/apps/$APP/secret/prod.secret.exs"
  if ["$TARGET_MIX_ENV" = "prod"]; then
    status "Linking '$_prod_secret_path'"
    __sync_remote "
      [-f ~/.profile] && source ~/.profile
      mkdir -p '$BUILD_AT'
      ln -sfn '$_prod_secret_path' '$BUILD_AT/config/prod.secret.exs'
    "
  fi
}

pre_erlang_clean_compile() {
  status "Running npm install"
    __sync_remote "
      [-f ~/.profile] && source ~/.profile
      set -e
      cd '$BUILD_AT'/assets
      npm install
    "

  status "Compiling assets"
    __sync_remote "
      [-f ~/.profile] && source ~/.profile
      set -e
      cd '$BUILD_AT'/assets
      node_modules/.bin/webpack --mode production --silent
    "

  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
    APP='$APP' MIX_ENV='$TARGET_MIX_ENV' $MIX_CMD phx.digest $SILENCE
    APP='$APP' MIX_ENV='$TARGET_MIX_ENV' $MIX_CMD phx.digest.clean $SILENCE
  "
}

```

---

_[View the full topic](https://forum.elixirforum.com/t/update-using-edeliver/27504)._
