ensalamento-entrypoint.sh 386 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/usr/bin/env bash
set -e


if [ "$1" = 'DEVELOPMENT' ]; then
    /usr/local/bin/node /app/bin/automigrate.js
    # echo "oi"
fi

if [ "$1" = 'PRODUCTION' ]; then
    /usr/local/bin/node /app/bin/automigrate.js
fi

# echo "while true; do sleep 2; done" >> /app/test.sh && chmod +x /app/test.sh
# /bin/bash /app/test.sh
/usr/local/bin/yarn start
exec "$@"
# exec "$@:2"
# exec "${@:2}"