Skip to content

PostgresSQL

Docker Pulls GitHub Stars Compose Templates

Description

Postgres: The World's Most Advanced Open Source Relational Database

Install/Setup

PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

There is a wealth of information to be found describing how to install and use PostgreSQL through the official documentation. The open source community provides many helpful places to become familiar with PostgreSQL, discover how it works.

We heavily recommend that if you spin up a container that requires a database you create a user for that container. You should NEVER use the root account for anything other than database management.

Strongly consider also installing pgAdmin for administration and pgBackup for periodic rotating backups.

Common Activities

Create user

CREATE USER newuser WITH PASSWORD 'password123';

Make user a superuser

CREATE USER newadmin WITH PASSWORD 'password123';
ALTER USER newadmin WITH SUPERUSER;

Create a database and owner to the new user

CREATE DATABASE newdatabase; ALTER DATABASE newdatabase OWNER TO newuser;