AppsDatabasespostgresqlOfficial Postgresql

Official PostgreSQL Image

Directory Structure

    • .env
    • docker-compose.yml

docker-compose.yml

version: '3.9'
 
services:
  db:
    image: postgres
    restart: always
    # set shared memory limit when using docker-compose
    shm_size: 128mb
    # or set shared memory limit when deploy via swarm stack
    #volumes:
    #  - type: tmpfs
    #    target: /dev/shm
    #    tmpfs:
    #      size: 134217728 # 128*2^20 bytes = 128Mb
    environment:
      POSTGRES_PASSWORD: example

Resources

GitHub: https://github.com/docker-library/postgres

Docker Hub: https://hub.docker.com/_/postgres

Configuration: See the Docker Hub page