production-evyos-systems-an.../ServicesRunner/AccountRecordServices/Test/entrypoint.sh

19 lines
660 B
Bash

#!/bin/sh
VENV_PATH="/opt/venv"
REQUIREMENTS_PATH="/app/ServicesRunner/requirements.txt"
SCHEMA_PATH="/app/ServicesRunner/Depends/schema.prisma"
PRISMA_BINARY_PATH="/app/ServicesRunner/Depends/root/.cache/prisma-python/binaries"
if [ ! -x "$VENV_PATH/bin/python" ]; then
python -m venv "$VENV_PATH"
"$VENV_PATH/bin/pip" install --no-cache-dir -r "$REQUIREMENTS_PATH"
"$VENV_PATH/bin/prisma" generate --schema "$SCHEMA_PATH"
fi
if ! find "$PRISMA_BINARY_PATH" -type f -name "prisma-query-engine-debian-openssl-3.0.x" | grep -q .; then
"$VENV_PATH/bin/prisma" py fetch
fi
exec "$VENV_PATH/bin/python" -m ServicesRunner.AccountRecordServices.Test.app