`homolog` image cannot start: Prisma 7 migrations fail with "datasource.url property is required"

Open
#2,690 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
postgresql, typescript
Domain
backend, databases

Research direction

Start with the image's package.json, runWithProvider.js, and prisma/postgresql-schema.prisma, then reproduce the migration command shown in the report. Trace how the image is built and configured around the missing prisma.config.ts; done means the homolog container completes PostgreSQL migrations and starts serving without changing the existing database.

Written by the indexing model from the issue text.

Description

Summary

The evoapicloud/evolution-api:homolog image (Evolution 2.4.0, baileys
7.0.0-rc13) never finishes startup. It enters a crash loop during the migration
step, before serving anything. The same host, same database and same environment
run v2.3.7 normally — reverting the tag brings the service straight back.

Environment

Image evoapicloud/evolution-api:homolog (pushed 2026-07-14)
Evolution 2.4.0
Baileys 7.0.0-rc13
Prisma ^7.8.0 (from the image's package.json)
Database PostgreSQL, reachable, already provisioned by v2.3.7
Config DATABASE_PROVIDER=postgresql, DATABASE_CONNECTION_URI=<set>

What happens

The container restarts in a loop, logging:

Deploying migrations for postgresql
> node runWithProvider.js "rm -rf ./prisma/migrations && cp -r ./prisma/DATABASE_PROVIDER-migrations ./prisma/migrations && npx prisma migrate deploy --schema ./prisma/DATABASE_PROVIDER-schema.prisma"
Prisma schema loaded from prisma/postgresql-schema.prisma.
Error: The datasource.url property is required in your Prisma config file when using prisma migrate deploy.
Error executing command: rm -rf ./prisma/migrations && cp -r ./prisma/postgresql-migrations ./prisma/migrations && npx prisma migrate deploy --schema ./prisma/postgresql-schema.prisma
Migration failed

Cause, as far as we could inspect

Inside the image, the datasource block declares no url:

datasource db {
  provider = "postgresql"
}

Prisma 7 expects the connection URL to come from a prisma.config.ts, and that
file does not exist in the image:

$ docker run --rm --entrypoint sh evoapicloud/evolution-api:homolog \
    -c 'ls -la /evolution/prisma.config.* 2>/dev/null || echo "no prisma.config"'
no prisma.config

So there is no place for the URL to come from, and migrate deploy refuses to
run regardless of how the environment is configured. Setting
DATABASE_CONNECTION_URI (the 2.3.x variable) has no effect on this path.

Steps to reproduce

  1. Take any working v2.3.7 deployment with PostgreSQL.
  2. Change only the image tag to homolog.
  3. docker compose up -d <service>.

Result: crash loop with the error above, no HTTP listener.

Notes

  • Migrations fail before touching the database, so reverting the tag is
    clean. We confirmed our schema intact afterwards: 37 tables, row counts
    unchanged, instance reconnected as open.
  • The tags for the 2.4 line are published without the v prefix
    (2.4.0-rc1, 2.4.0-rc2, homolog), unlike the 2.3 line (v2.3.7). That is
    easy to miss when looking for v2.4*.
  • Worth noting for anyone testing 2.4.0-rc2 as an alternative: it ships the
    same baileys 7.0.0-rc.9 as v2.3.7, so it is not a way to pick up baileys
    fixes.
Dominant language
TypeScript
Stars
9.6k
Forks
7.3k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from evolution-foundation/evolution-api

All issues in evolution-foundation/evolution-api

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.