Fix DB auth: local-only Postgres, install password defaults

This commit is contained in:
vpn-panel
2026-05-21 19:07:07 +03:00
parent 74d5d34679
commit 98f78d712e
5 changed files with 106 additions and 33 deletions
+9 -2
View File
@@ -9,8 +9,9 @@ services:
POSTGRES_DB: ${POSTGRES_DB:-vpnpanel}
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
# БД только внутри Docker-сети, с интернета недоступна
expose:
- "5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-vpnpanel} -d ${POSTGRES_DB:-vpnpanel}"]
interval: 5s
@@ -26,6 +27,12 @@ services:
volumes:
- .:/work
entrypoint: ["/app/install"]
environment:
POSTGRES_HOST: postgres
POSTGRES_PORT: "5432"
POSTGRES_USER: ${POSTGRES_USER:-vpnpanel}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
POSTGRES_DB: ${POSTGRES_DB:-vpnpanel}
depends_on:
postgres:
condition: service_healthy