Files
archived-hipudding-teslamate/entrypoint.sh
Adrian Kumpf da7c015900 Use Debian as base iamge
Elixir 1.11-alpine is based on Alpine 3.13 which upgraded musl to 1.2.
On ARMhf, ARMv7 or x86 platforms, musl 1.2 changed the definition of
time_t to 64-bits. That seems to be incompatible with OTP.
2021-01-31 17:08:02 +01:00

17 lines
342 B
Bash

#!/usr/bin/env sh
set -e
: "${DATABASE_HOST:="127.0.0.1"}"
: "${DATABASE_PORT:=5432}"
# wait until Postgres is ready
while ! nc -z ${DATABASE_HOST} ${DATABASE_PORT} 2>/dev/null; do
echo waiting for postgres at ${DATABASE_HOST}:${DATABASE_PORT}
sleep 1s
done
# apply migrations
bin/teslamate eval "TeslaMate.Release.migrate"
exec "$@"