(fix) dockerfile run prisma generate if DATABSE_URL set in env

This commit is contained in:
ishaan-jaff 2024-01-09 13:10:03 +05:30
parent 46bd99ad98
commit 358a44ce13

View file

@ -50,6 +50,12 @@ RUN pip install --no-cache-dir --find-links=/wheels/ -r requirements.txt \
&& pip install *.whl \
&& rm -f *.whl
# if user has set os.environ['DATABASE_URL'] != None, run prisma generate
RUN if [ -n "$DATABASE_URL" ]; then \
echo "DATABASE_URL is set to: $DATABASE_URL"; \
prisma generate; \
fi
EXPOSE 4000/tcp
# Set your entrypoint and command