Good postgres monitoring tool:
sudo apt install pg_activity
Usage:
pg_activity -U testuser -h localhost -d testdb
Start a postgres container with a persistent volume, use for development.
docker run -d --name postgres_betterauth_dev -p 5432:5432 -e POSTGRES_USER=auth_service_user -e POSTGRES_PASSWORD=develop -e POSTGRES_DB=auth_db_dev_proxy1 -v auth_db_postgres_vol:/var/lib/postgresql/data postgres
# Command to forcibly stop and delete the container and volume when you're done.
# Requires Powershell 7+ on Windows.
docker rm -f postgres_betterauth_dev && docker volume rm auth_db_postgres_vol
Start a small container of postgres on Windows using the host networking mode
docker run -d `
--name my_postgres `
--network host `
-e POSTGRES_USER=testuser `
-e POSTGRES_PASSWORD=qwerty `
-e POSTGRES_DB=testdb `
postgres
Start a small container of postgres on Windows exposing the port without host networking
docker run -d `
--name my_postgres `
-p 5432:5432 `
-e POSTGRES_USER=testuser `
-e POSTGRES_PASSWORD=qwerty `
-e POSTGRES_DB=testdb `
postgres