Sign inSign up

ohanalabs/pgmind

By ohanalabs

•Updated 6 months ago

PostgreSQL-focused CLI assistant for deterministic diagnostics

Image
Integration & delivery
Databases & storage
Monitoring & observability
0

2.3K

ohanalabs/pgmind repository overview

⁠Docker Hub: Download and Usage Guide

Image repository: ohanalabs/pgmind⁠

⁠1) Pulling the image

Recommended (pinned release tag):

docker pull ohanalabs/pgmind:v0.1.19

Fast track (latest):

docker pull ohanalabs/pgmind:latest

Check local image:

docker image ls ohanalabs/pgmind

⁠2) Basic execution

The image entrypoint is pgmind, so you can run CLI commands directly:

docker run --rm ohanalabs/pgmind:latest --help
docker run --rm ohanalabs/pgmind:latest check-catalog --output json

⁠3) Runtime with environment variables

Pass runtime settings via -e (or --env-file):

docker run --rm \
  -e PGMIND_RUNTIME_PROFILE=production \
  -e PGMIND_DB_DSN="postgresql://user:pass@host:5432/dbname" \
  -e PGMIND_DB_CONNECT_TIMEOUT=5 \
  -e PGMIND_DB_STATEMENT_TIMEOUT_MS=10000 \
  ohanalabs/pgmind:latest check security --scope all --output json

Using .env file:

docker run --rm --env-file ./.env ohanalabs/pgmind:latest monitor --output json

⁠4) Mounting SQL files and artifacts

The runtime user works under /opt/pgmind. Mount your local folder there to read inputs and persist outputs:

docker run --rm \
  --env-file ./.env \
  -v "$PWD:/opt/pgmind" \
  ohanalabs/pgmind:latest explain-file ./query.sql --output json

Migration with rollback artifacts:

docker run --rm \
  --env-file ./.env \
  -v "$PWD:/opt/pgmind" \
  ohanalabs/pgmind:latest migration \
  --file ./migration.sql \
  --rollback-output-dir ./rollback \
  --strict --fail-on error --output json

⁠5) Accessing the container with Bash

To open an interactive shell:

docker run --rm -it --entrypoint bash ohanalabs/pgmind:latest

With mounted workspace:

docker run --rm -it \
  --entrypoint bash \
  -v "$PWD:/opt/pgmind" \
  ohanalabs/pgmind:latest

Inside the shell:

id
pwd
pgmind --help

Notes:

  • The container runs as non-root user (pgmind).
  • Interactive shell enforces workdir under /opt/pgmind.

⁠6) Common usage patterns

Run deterministic checks:

docker run --rm --env-file ./.env ohanalabs/pgmind:latest check autovacuum --scope selected --output text
docker run --rm --env-file ./.env ohanalabs/pgmind:latest check analyze --scope all --output json
docker run --rm --env-file ./.env ohanalabs/pgmind:latest check security --scope all --output json

Run monitor:

docker run --rm \
  --env-file ./.env \
  -v "$PWD:/opt/pgmind" \
  ohanalabs/pgmind:latest monitor --scope selected --output json

⁠7) Troubleshooting

  • database connection error:
    • validate PGMIND_DB_DSN, network route, credentials, and server reachability.
  • runtime_config_error:
    • validate required env vars for profile/LLM settings.
  • file not found for explain-file or migration --file:
    • mount local path with -v "$PWD:/opt/pgmind" and use relative file path from /opt/pgmind.
  • permission denied on output files:
    • ensure host folder is writable and mapped to /opt/pgmind.

⁠8) Security and operational notes

⁠What changed in v0.1.23

Changes delivered by ohanalabs.

⁠Added
  • No explicit Added items in this release.
⁠Changed
  • Docker publication blocks CRITICAL and HIGH vulnerabilities.
  • Remaining MEDIUM/LOW findings are tracked by explicit exceptions with owner and expiry.
  • Public notes contain non-sensitive summaries only.
  • Detailed vulnerability reports must use private channels from SECURITY.md.
  • fix: suportar COMMENT ON COLUMN/TABLE no migration (#441) in pull/442
  • chore(release): bump version to 0.1.23 in pull/443
⁠Fixed
  • Stability, packaging, and delivery workflow hardening.

Tag summary

Content type

Image

Digest

sha256:9861bdae0…

Size

66.1 MB

Last updated

6 months ago

docker pull ohanalabs/pgmind