+ postgresql server & pgadmin

This commit is contained in:
2026-10-13 19:02:35 +03:00
parent 9b3a69d296
commit 9516d0da25
7 changed files with 113 additions and 21 deletions

View File

@ -113,6 +113,24 @@ Optional MCP server so Cursor can query the `db` container over the Docker netwo
First image build can take a while (upstream MariaDB MCP dependencies).
### PostgreSQL, pgAdmin, Postgres MCP
Services `pgsql`, `pgadmin`, `mcp-postgres` are described in `docker-compose.base.yml`; copy them from
`docker-compose.postgres.yml.example` into your `docker-compose.yml` (volumes `database-pgsql` and `pgadmin` too).
`dc up -d pgsql pgadmin mcp-postgres`
- `pgsql` — official `postgres:18` image. Port `5432`, user, password and database `intai`.
Since 18 the data lives in `/var/lib/postgresql/<major>/docker`, so the volume is mounted at `/var/lib/postgresql`.
Another major version does not start on the same volume — dump and restore.
- `pgadmin` — pgAdmin 4 in desktop mode, no login: http://pgadmin.intai.localhost (or the port from the example). The `intai` server comes from `config/pgadmin/servers.json` on every start; the password (`intai`) is asked once, tick "Save password".
Register the server once: host `pgsql`, port `5432`, user `intai`, password `intai`.
- `mcp-postgres` — [Postgres MCP Pro](https://github.com/crystaldba/postgres-mcp), SSE on
`http://127.0.0.1:${MCP_POSTGRES_PORT:-8766}/sse`.
- `./bash/psql.sh [database] [user]` — psql inside the container.
Transfer of the intai database from MariaDB and its verification: `docs/PostgreSQL.md` in the intai project.
### Workspace
For execute composer update|install or nodejs operations, also yarn, npm and all node-builds.