Fix DB DNS with vpn_internal compose network

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
test2
2026-07-25 20:54:03 +03:00
co-authored by Cursor
parent dcdd1f6898
commit 85a2800870
2 changed files with 13 additions and 4 deletions
+10 -1
View File
@@ -22,6 +22,7 @@ services:
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-change-me-strong-password}
ADMIN_EMAIL: ${ADMIN_EMAIL:-admin@example.com}
# hostname of the compose service below
POSTGRES_HOST: ${POSTGRES_HOST:-postgres}
POSTGRES_USER: ${POSTGRES_USER:-vpn}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-vpn}
@@ -44,6 +45,7 @@ services:
- wg_data:/data/wireguard
- awg_data:/data/amneziawg
networks:
- vpn_internal
- dokploy-network
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:8000/health"]
@@ -62,7 +64,10 @@ services:
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- dokploy-network
vpn_internal:
aliases:
- postgres
- db
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 5s
@@ -71,6 +76,10 @@ services:
start_period: 10s
networks:
# Compose DNS (panel -> postgres) works on this project network
vpn_internal:
driver: bridge
# Traefik / Dokploy public routing
dokploy-network:
external: true