A last.fm clone written in Elixir
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

60 lines
1.9 KiB

APP="dagon"
APP_HOME="/opt/dagon"
USER_HOME="/var/lib/dagon"
BUILD_HOST="159.69.81.247"
BUILD_USER="dagon"
BUILD_AT="$APP_HOME/build"
PRODUCTION_HOSTS="159.69.81.247"
PRODUCTION_USER="dagon"
DELIVER_TO="$APP_HOME/release"
START_DEPLOY=true
pre_erlang_get_and_update_deps() {
status "Copying production secrets" # log output prepended with "----->"
local _prod_secret_path="$APP_HOME/config/prod.secret.exs"
if [ "$TARGET_MIX_ENV" = "prod" ]; then
__sync_remote "
ln -sfn '$_prod_secret_path' '$BUILD_AT/config/prod.secret.exs'
"
fi
}
post_extract_release_archive() {
status "Removing start_erl.data"
__remote "
[ -f ~/.profile ] && source ~/.profile
set -e
cd /opt/dagon/release/dagon/var $SILENCE
[ -f ./start_erl.data ] && rm start_erl.data
"
}
post_erlang_clean_compile() {
status "Installing NPM dependencies" # log output prepended with "----->"
__sync_remote " # runs the commands on the build host
set -e # fail if any command fails (recommended)
cd '$BUILD_AT/assets' # enter the build directory on the build host (required)
# run your custom task
npm install
"
status "Generating Assets" # log output prepended with "----->"
__sync_remote " # runs the commands on the build host
set -e # fail if any command fails (recommended)
cd '$BUILD_AT/assets' # enter the build directory on the build host (required)
# run your custom task
npm run deploy
"
status "Running phoenix.digest" # log output prepended with "----->"
__sync_remote " # runs the commands on the build host
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
"
}