-
Notifications
You must be signed in to change notification settings - Fork 120
Description
Hi,
I'm experiencing an issue running the same docker-compose.yml on two different environments.
On macOS, everything starts correctly.
On Debian (both bare-metal and VM tested), the pgbackweb container fails immediately with exit code 201.
Postgres starts fine and reports healthy status on both systems.
However, on Debian, PgBackWeb cannot resolve the hostname postgres inside the Docker network.
Container logs (pgbackweb):
task: [servem] task goose -- up
2025/11/14 09:35:06 goose run: failed to connect to user=postgres database=pgbackweb: hostname resolving error: lookup postgres on 127.0.0.11:53: no such host; failed to connect to user=postgres database=pgbackweb: hostname resolving error: lookup postgres on 127.0.0.11:53: no such host
task: Failed to run task "goose": exit status 1
task: Failed to run task "servem": exit status 201
It looks like the service pgbackweb cannot resolve the hostname postgres, even though both services are defined in the same Compose file.
services:
pgbackweb:
image: eduardolat/pgbackweb:latest
ports:
- "8085:8085"
volumes:
- ./backups:/backups
environment:
PBW_ENCRYPTION_KEY: "my_secret_key"
PBW_POSTGRES_CONN_STRING: "postgresql://postgres:password@postgres:5432/pgbackweb?sslmode=disable"
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:18
environment:
POSTGRES_USER: postgres
POSTGRES_DB: pgbackweb
POSTGRES_PASSWORD: password
ports:
- "5433:5432"
volumes:
- ./data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
Question
Is PgBackWeb or this Docker stack incompatible with Debian in some way?
Or is there any known networking/DNS issue that affects hostname resolution inside containers specifically on Debian?
Thanks!