Fix DB auth: local-only Postgres, install password defaults
This commit is contained in:
+9
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user