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.

52 lines
926 B

# shellcheck shell=dash
5 years ago
set -e
log() {
echo -e "\n#> $@\n" 1>&2
if [ -n "$BUILDTIME" ]; then
log "Getting rebar..."
mix local.rebar --force
4 years ago
log "Getting hex..."
mix local.hex --force
log "Getting dependencies..."
mix deps.get
4 years ago
log "Precompiling..."
mix compile
exit 0
log "Syncing changes and patches..."
rsync -av /custom.d/ /home/pleroma/pleroma/
log "Recompiling..."
mix compile
log "Waiting for postgres..."
while ! pg_isready -U pleroma -d postgres://db:5432/pleroma -t 1; do
sleep 1s
log "Performing sanity checks..."
if ! touch /uploads/.sanity-check; then
log "\
The uploads datadir is NOT writable by `id -u`:`id -g`!\n\
This will break all upload functionality.\n\
Please fix the permissions and try again.\
exit 1
rm /uploads/.sanity-check
log "Migrating database..."
5 years ago
mix ecto.migrate
log "Liftoff o/"
5 years ago
exec mix phx.server