Fix DB DNS with vpn_internal compose network
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+10
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user