Make custom.d work again
This commit is contained in:
parent
a72cfa9b4e
commit
de32be4144
@ -14,7 +14,7 @@ EXPOSE 4000
|
|||||||
# Get dependencies
|
# Get dependencies
|
||||||
RUN \
|
RUN \
|
||||||
apk add --no-cache --virtual .tools \
|
apk add --no-cache --virtual .tools \
|
||||||
git curl postgresql-client \
|
git curl rsync postgresql-client \
|
||||||
\
|
\
|
||||||
&& apk add --no-cache --virtual .sdk \
|
&& apk add --no-cache --virtual .sdk \
|
||||||
build-base \
|
build-base \
|
||||||
|
@ -2,29 +2,32 @@
|
|||||||
# shellcheck shell=dash
|
# shellcheck shell=dash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -x
|
|
||||||
|
|
||||||
if [ -n "$BUILDTIME" ]; then
|
if [ -n "$BUILDTIME" ]; then
|
||||||
|
echo "#> Preparing compilation..."
|
||||||
|
|
||||||
mix local.rebar --force
|
mix local.rebar --force
|
||||||
mix local.hex --force
|
mix local.hex --force
|
||||||
|
|
||||||
|
echo "#> Compiling..."
|
||||||
mix deps.get
|
mix deps.get
|
||||||
mix compile
|
mix compile
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set +x
|
echo "#> Applying customizations and patches.."
|
||||||
while ! pg_isready -U pleroma -d postgres://db:5432/pleroma -t 1; do
|
rsync -av /custom.d/ /home/pleroma/pleroma/
|
||||||
echo "[X] Database is starting up..."
|
|
||||||
sleep 1s
|
|
||||||
done
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# Recompile
|
echo "#> Recompiling..."
|
||||||
mix compile
|
mix compile
|
||||||
|
|
||||||
# Migrate db
|
echo "#> Waiting until database is ready..."
|
||||||
|
while ! pg_isready -U pleroma -d postgres://db:5432/pleroma -t 1; do
|
||||||
|
sleep 1s
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "#> Upgrading database..."
|
||||||
mix ecto.migrate
|
mix ecto.migrate
|
||||||
|
|
||||||
# Off we go!
|
echo "#> Liftoff!"
|
||||||
exec mix phx.server
|
exec mix phx.server
|
||||||
|
Loading…
Reference in New Issue
Block a user