pleroma-docker/entrypoint.ash

34 lines
527 B
Plaintext
Raw Normal View History

2018-04-07 16:29:55 -04:00
#!/bin/ash
set -e
2018-04-08 16:49:07 -04:00
# Ensure that the environment is clean
if [[ -d /pleroma-runtime ]]; then
rm -rf /pleroma-runtime
2018-04-07 16:29:55 -04:00
fi
2018-04-08 16:49:07 -04:00
mkdir /pleroma-runtime
2018-04-07 16:29:55 -04:00
2018-04-08 16:49:07 -04:00
# Copy sources
rsync -azI /pleroma/ /pleroma-runtime/
2018-04-08 10:15:44 -04:00
2018-04-08 16:49:07 -04:00
# Copy overrides
rsync -azI /custom.d/ /pleroma-runtime/
# Go to runtime workspace
cd /pleroma-runtime
# Make sure that the tooling is present
mix local.hex --force
mix local.rebar --force
# Recompile
mix deps.get
mix clean && mix compile
# Prepare DB
mix ecto.create
mix ecto.migrate
2018-04-07 16:29:55 -04:00
2018-04-08 16:49:07 -04:00
# Liftoff o/
exec mix phx.server