mirror of
https://github.com/netfun2000/hipudding-teslamate.git
synced 2026-02-27 09:44:28 +08:00
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.
17 lines
342 B
Bash
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 "$@"
|