😀
Notes
  • My Notes
  • Software Development
    • Getting Started
    • VSCodium
    • Go
  • System Administration
    • Networking cheatsheet
    • Infra security check tools
    • Using Ubuntu as a workstation
  • Application Infrastructure
    • Message Brokers
      • Kafka
      • NATS
    • Databases
      • MongoDB
      • MySQL
      • PostgreSQL
      • Redis
    • Kubernetes
      • Standard resources cheatsheet
      • Istio
      • Prometheus
    • Workflow Orchestrators
      • Airflow
  • Cloud Infrastructure
    • Terraform
      • AWS
        • Kubernetes IAM roles
  • Climbing
    • Overview of Climbing
    • Singapore
  • Crypto
    • Introduction to Crypto
    • Web3 terminology
  • Guides
    • Beginner's Guide to Personal Operational Security
Powered by GitBook
On this page
  • Reference Links
  • Configuration
  • Docker
  • Image
  • Compose
  1. Application Infrastructure
  2. Databases

PostgreSQL

PreviousMySQLNextRedis

Last updated 1 year ago

Reference Links

Configuration

Docker

Image

Compose

version: "3.7"
services:
  postgres: # access with `psql -Uuser -h127.0.0.1 -p5432 database -W`
    # image reference: https://hub.docker.com/_/postgres
    image: library/postgres:15.3-alpine
    environment:
      POSTGRES_PASSWORD: password
      POSTGRES_USER: user
      POSTGRES_DB: database
    ports: ["5432:5432"]
    network_mode: host
    volumes: # [] # uncomment this and comment below to remove persistence
      - ./.data/postgres/data/var/lib/postgres/data:/var/lib/postgresql/data

Postgres - Official Image | Docker Hub
Logo