RUN echo '#!/bin/sh\n\
    until pg_isready -h postgres -p 5432 -U ${POSTGRES_USER} -d ${POSTGRES_DB}; do\n\
    echo "Waiting for postgres...";\n\
    sleep 2;\n\
    done\n\
    \n\
    echo "PostgreSQL is ready!"\n\
    \n\
    npx prisma migrate deploy\n\
    node dist/main.js' > /app/start.sh && chmod +x /app/start.sh
