This commit is contained in:
Vassiliy Yegorov
2022-08-25 13:47:36 +07:00
parent 722091fdb4
commit 1e6377dc46
2 changed files with 3 additions and 5 deletions

View File

@@ -12,9 +12,9 @@ vault secrets enable -path=psql database
vault write psql/config/test-psql \
plugin_name=postgresql-database-plugin \
allowed_roles="db1-role" \
connection_url="postgresql://{{username}}:{{password}}@psql:5432/testdb1?sslmode=disable" \
connection_url="postgresql://{{username}}:{{password}}@psql:5432/postgres?sslmode=disable" \
username="testuser" \
password="pa$$w0rd"
password="passw0rd"
```
2. добавляем роль

View File

@@ -5,10 +5,8 @@ services:
container_name: postgres
restart: always
environment:
POSTGRES_DB: testdb1
POSTGRES_USER: testuser
POSTGRES_PASSWORD: pa$$w0rd
PGDATA: /var/lib/postgresql/data
POSTGRES_PASSWORD: passw0rd
volumes:
- pgdata:/var/lib/postgresql/data
expose: