2019-01-10 18:03:52 +00:00
|
|
|
#!/bin/ash
|
|
|
|
# shellcheck shell=dash
|
2018-08-20 21:06:34 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2019-01-10 18:03:52 +00:00
|
|
|
if [ -n "$BUILDTIME" ]; then
|
2019-01-09 20:23:53 +00:00
|
|
|
mix local.rebar --force
|
|
|
|
mix local.hex --force
|
2018-12-24 22:20:17 +00:00
|
|
|
|
|
|
|
mix deps.get
|
|
|
|
mix compile
|
2018-12-30 13:30:36 +00:00
|
|
|
exit 0
|
2018-12-24 22:20:17 +00:00
|
|
|
fi
|
|
|
|
|
2019-01-10 18:32:40 +00:00
|
|
|
set +x
|
|
|
|
while ! pg_isready -U pleroma -d postgres://db:5432/pleroma -t 1; do
|
|
|
|
echo "[X] Database is starting up..."
|
|
|
|
sleep 1s
|
|
|
|
done
|
|
|
|
set -x
|
|
|
|
|
|
|
|
# Recompile
|
2018-12-30 13:30:36 +00:00
|
|
|
mix compile
|
|
|
|
|
2018-12-24 22:20:17 +00:00
|
|
|
# Migrate db
|
2018-08-20 21:06:34 +00:00
|
|
|
mix ecto.migrate
|
2018-12-24 22:20:17 +00:00
|
|
|
|
|
|
|
# Off we go!
|
2018-08-20 21:06:34 +00:00
|
|
|
exec mix phx.server
|