Install & Management
Linux Ubuntu
Ubuntu apt includes PostgreSQL by default, install it with:
apt install postgresqlDocker Images
Docker Composer
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: db-name
POSTGRES_USER: db-root-user
POSTGRES_PASSWORD: db-root-pass
# OR (if using secrets)
POSTGRES_PASSWORD_FILE: /run/secrets/root_pass
secrets:
- root_pass
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'db-root-user']
interval: 10s
timeout: 5s
retries: 5
ports:
- '5432:5432'
volumes:
- ./init:/docker-entrypoint-initdb.d
- postgres:/var/lib/postgresql/data
# To add pg_stat_statement
command: >
postgres
-c shared_preload_libraries=pg_stat_statements
-c pg_stat_statements.track=all
-c pg_stat_statements.max=10000
-c track_activity_query_size=2048Execute
Linux & Docker Images
Manage
Databases
Listing
Dumping
Importing
Schemas
Listing
Dumping
Importing
Tables
Listing
Creating tables
Dumping
Importing
Export to csv
Indexes
Constraints
Functions
Views
Roles/Users
Listing
Permissions
Last updated