Fix postgres DNS: put both services on dokploy-network
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+10
-8
@@ -1,5 +1,5 @@
|
||||
services:
|
||||
# IMPORTANT for Dokploy: attach domain to this service, port 8000
|
||||
# Domain in Dokploy → service `panel`, port `8000`
|
||||
panel:
|
||||
build:
|
||||
context: .
|
||||
@@ -22,10 +22,11 @@ services:
|
||||
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-change-me-strong-password}
|
||||
ADMIN_EMAIL: ${ADMIN_EMAIL:-admin@example.com}
|
||||
|
||||
POSTGRES_HOST: ${POSTGRES_HOST:-postgres}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-vpn}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-vpn}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-vpn_panel}
|
||||
DATABASE_URL: ${DATABASE_URL:-postgresql+asyncpg://vpn:vpn@postgres:5432/vpn_panel}
|
||||
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
|
||||
|
||||
PUBLIC_HOST: ${PUBLIC_HOST:-127.0.0.1}
|
||||
PUBLIC_PORT: ${PUBLIC_PORT:-51820}
|
||||
@@ -43,13 +44,13 @@ services:
|
||||
- wg_data:/data/wireguard
|
||||
- awg_data:/data/amneziawg
|
||||
networks:
|
||||
- vpn_net
|
||||
- dokploy-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://127.0.0.1:8000/health"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 90s
|
||||
start_period: 120s
|
||||
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
@@ -61,16 +62,17 @@ services:
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- vpn_net
|
||||
- dokploy-network
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
retries: 20
|
||||
start_period: 10s
|
||||
|
||||
networks:
|
||||
vpn_net:
|
||||
driver: bridge
|
||||
dokploy-network:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
||||
Reference in New Issue
Block a user