Categories
postgresql sql

Securing PostgreSQL using Host Based Authentication (HBA)

HBA stands for Host-base Authentication. The pg_hba.conf config file controls the authentication method. By default, local connections to Postgres uses peer¬†authentication. That means that instead of asking you for a password, it checks to see if you are currently logged in as a system user that matches the user name in Postgres. This is where […]

Categories
docker

Docker: PostgreSQL

https://hub.docker.com/_/postgres Download docker pull postgres Create Option 1 – docker run docker run -d \ –name postgres-itsmetommy \ -e POSTGRES_PASSWORD=12345 \ -p 5432:5432 \ postgres Option 2 – docker-compose cat <<EOF > docker-compose.yml version: ‘3’services: postgres: image: postgres environment: POSTGRES_PASSWORD: “12345” ports: – “5432:5432” container_name: postgres-itsmetommy EOF Create. docker-compose up -d Logs. docker-compose logs -f […]