chore: pgadmin addon to administer docker store DB (#90)

This commit is contained in:
NagyZoltanPeter 2024-05-07 16:24:06 +02:00 committed by GitHub
parent 8abb2a474d
commit 7e9dbb9fde
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 59 additions and 0 deletions

View File

@ -51,3 +51,19 @@ proofs, hashing, Merkle tree, Blockchain, etc.
Deeper technical details can be found in:
* [RLN-V1 spec](https://rfc.vac.dev/spec/32/)
* [RLN-V2 spec](https://rfc.vac.dev/spec/58/)
## DB Administration
In case compositon is started with command
```console
docker compose --profile dbadmin up -d
```
an additional service - pgadmin - is started and can be accessed from browser on http://localhost:15432
That will give insights on the Node's message store database.
### Shutting down the container with pgadmin service
If started with 'dbadmin' profile it must be used when stopping it:
```console
docker compose --profile dbadmin down
```

View File

@ -141,3 +141,46 @@ services:
- --config.file=/etc/pgexporter/postgres-exporter.yml
depends_on:
- postgres
pgadmin:
image: dpage/pgadmin4:latest
environment:
- PGADMIN_DEFAULT_EMAIL=waku@waku.com
- PGADMIN_DEFAULT_PASSWORD=wakuwaku
- PGADMIN_CONFIG_SERVER_MODE=False
- PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED=False
- PGADMIN_LISTEN_PORT=80
ports:
- 15432:80
user: root
entrypoint: /bin/sh -c "chmod 600 /pgpass; /entrypoint.sh;"
volumes:
- pgadmin:/var/lib/pgadmin
configs:
- source: servers.json
target: /pgadmin4/servers.json
- source: pgpass
target: /pgpass
depends_on:
- postgres
profiles:
- dbadmin
volumes:
pgadmin:
configs:
pgpass:
content: postgres:5432:*:${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-test123}
servers.json:
content: |
{"Servers": {"1": {
"Group": "Servers",
"Name": "WakuStoreDB",
"Host": "postgres",
"Port": 5432,
"MaintenanceDB": "postgres",
"Username": "postgres",
"PassFile": "/pgpass",
"SSLMode": "disable"
}}}