diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index 5062498..b5e6165 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -24,6 +24,18 @@ services: networks: - default - gitea_gitea + # Even with postgres NOT attached to gitea_gitea, the app container's DNS + # for "postgres" still returns ambiguous results: Gitea's core stack on + # gitea_gitea has its own container named "postgres", and Docker's + # embedded DNS resolves bare names against ALL attached networks. Result: + # the app's startup script's `prisma db push` and the seed script's + # `prisma.user.count()` may cache different IPs and end up on different + # DBs (one with our schema, one without — Gitea's). Pin DATABASE_URL and + # REDIS_URL to the unique compose container names so resolution is + # unambiguous regardless of attached networks. + environment: + DATABASE_URL: postgresql://capakraken:capakraken_dev@capakraken-postgres-1:5432/capakraken + REDIS_URL: redis://capakraken-redis-1:6379 networks: gitea_gitea: