fix(deploy): let the API reach Dokploy's database again

Since 815dcc3 the api service only joined the stack-private `internal`
network, so it could no longer resolve the database host on
`dokploy-network` and `prisma migrate deploy` failed with P1001.

api joins `dokploy-network` again, only to reach the database. nginx
still proxies to the `superlist-api` alias, which is declared only on
`internal`, so the shared network never routes our traffic elsewhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jose Selesan
2026-10-19 13:08:19 -03:00
parent debf3b2728
commit 56853bbdeb
2 changed files with 11 additions and 7 deletions

View File

@@ -1,9 +1,10 @@
# Dokploy deployment: the API and the static frontend behind nginx.
# The database is external (Dokploy's). Only `web` joins the shared
# `dokploy-network` so Dokploy's Traefik can reach it via the Domains UI; the
# API talks to nginx over the stack-private `internal` network, under the
# unique alias `superlist-api`, so no other project on `dokploy-network`
# answering to `api` can ever receive our traffic.
# The database is external (Dokploy's) and lives on the shared
# `dokploy-network`, so both services join it: `web` so Dokploy's Traefik can
# reach it via the Domains UI, `api` so it can reach the database. nginx talks
# to the API over the stack-private `internal` network, under the unique alias
# `superlist-api` (declared only there), so no other project on
# `dokploy-network` answering to `api` can ever receive our traffic.
services:
api:
build:
@@ -29,6 +30,8 @@ services:
internal:
aliases:
- superlist-api
# Only to reach Dokploy's database; nginx never resolves the API here.
dokploy-network:
healthcheck:
test:
[