Update entrypoint script in Dockerfile and remove DATABASE_URL reference from schema.prisma: Modify entrypoint to check for prisma.config.ts instead of schema.prisma, and streamline migration command. Remove DATABASE_URL environment variable usage from schema.prisma for improved clarity.
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 1m9s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 1m9s
This commit is contained in:
@@ -69,10 +69,10 @@ RUN echo '#!/bin/sh' > /app/entrypoint.sh && \
|
||||
echo ' echo "ERROR: DATABASE_URL is not set"' >> /app/entrypoint.sh && \
|
||||
echo ' exit 1' >> /app/entrypoint.sh && \
|
||||
echo 'fi' >> /app/entrypoint.sh && \
|
||||
echo 'echo "DATABASE_URL is set (checking schema.prisma)..."' >> /app/entrypoint.sh && \
|
||||
echo 'ls -la /app/prisma/schema.prisma || echo "ERROR: schema.prisma not found"' >> /app/entrypoint.sh && \
|
||||
echo 'echo "DATABASE_URL is set (checking prisma.config.ts)..."' >> /app/entrypoint.sh && \
|
||||
echo 'ls -la /app/prisma.config.ts || echo "ERROR: prisma.config.ts not found"' >> /app/entrypoint.sh && \
|
||||
echo 'export DATABASE_URL' >> /app/entrypoint.sh && \
|
||||
echo 'cd /app && pnpm dlx prisma migrate deploy --schema=./prisma/schema.prisma' >> /app/entrypoint.sh && \
|
||||
echo 'cd /app && pnpm dlx prisma migrate deploy' >> /app/entrypoint.sh && \
|
||||
echo 'exec pnpm start' >> /app/entrypoint.sh && \
|
||||
chmod +x /app/entrypoint.sh && \
|
||||
chown nextjs:nodejs /app/entrypoint.sh
|
||||
|
||||
Reference in New Issue
Block a user