mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 05:37:59 +01:00
correct brackets syntax, use correct mnesia dir
This commit is contained in:
parent
66371e66c6
commit
621e75dd2a
2 changed files with 9 additions and 4 deletions
|
@ -66,6 +66,8 @@ config :philomena, PhilomenaWeb.Endpoint,
|
|||
secret_key_base: secret_key_base,
|
||||
server: true
|
||||
|
||||
config :mnesia, :dir, System.get_env("MNESIA_DIR")
|
||||
|
||||
# ## Using releases (Elixir v1.9+)
|
||||
#
|
||||
# If you are doing OTP releases, you need to instruct Phoenix
|
||||
|
|
11
post-receive
11
post-receive
|
@ -52,25 +52,28 @@ BLUE_STARTED=$?
|
|||
lsof -i :4001
|
||||
GREEN_STARTED=$1
|
||||
|
||||
if [ $BLUE_STARTED -eq 1 -a $GREEN_STARTED -eq 1 ]; then
|
||||
if [[ $BLUE_STARTED == 1 && $GREEN_STARTED == 1 ]]; then
|
||||
die "both blue and green instances are running; is another deploy in progress?"
|
||||
fi
|
||||
|
||||
if [ $BLUE_STARTED -eq 0 -a $GREEN_STARTED -eq 0 ]; then
|
||||
if [[ $BLUE_STARTED == 0 && $GREEN_STARTED == 0 ]]; then
|
||||
echo "app not started, starting it now"
|
||||
NODENAME=philomena_0 PORT=4000 _build/prod/rel/philomena/bin/philomena start
|
||||
fi
|
||||
|
||||
if [ $BLUE_STARTED -eq 1 -a $GREEN_STARTED -eq 0 ]; then
|
||||
if [[ $BLUE_STARTED == 1 && $GREEN_STARTED == 0 ]]; then
|
||||
echo "rolling blue (4000) over to green (4001)"
|
||||
BLUE_PID=$(lsof -Fp -i :4000 | head -n1 | sed 's/^p//')
|
||||
NODENAME=philomena_1 PORT=4001 _build/prod/rel/philomena/bin/philomena start
|
||||
sleep 20
|
||||
kill -TERM $BLUE_PID
|
||||
fi
|
||||
|
||||
if [ $BLUE_STARTED -eq 0 -a $GREEN_STARTED -eq 1 ]; then
|
||||
if [[ $BLUE_STARTED == 0 && $GREEN_STARTED == 1 ]]; then
|
||||
echo "rolling green (4001) over to blue (4000)"
|
||||
GREEN_PID=$(lsof -Fp -i :4001 | head -n1 | sed 's/^p//')
|
||||
NODENAME=philomena_0 PORT=4000 _build/prod/rel/philomena/bin/philomena start
|
||||
sleep 20
|
||||
kill -TERM $GREEN_PID
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue