Skip to content

daemonless/postgres

Repository files navigation

PostgreSQL

The World's Most Advanced Open Source Relational Database on FreeBSD.

Port 5432
Registry ghcr.io/daemonless/postgres
Docs daemonless.io/images/postgres
Source https://www.postgresql.org/
Website https://www.postgresql.org/

Deployment

Podman Compose

services:
  postgres:
    image: ghcr.io/daemonless/postgres:latest
    container_name: postgres
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=postgres
      - PUID=1000
      - PGID=1000
      - TZ=UTC
    volumes:
      - /path/to/containers/postgres/var/lib/postgresql/data:/var/lib/postgresql/data
    ports:
      - 5432:5432
    restart: unless-stopped

Podman CLI

podman run -d --name postgres \
  -p 5432:5432 \
  --annotation 'org.freebsd.jail.allow.sysvipc=true' \
  -e POSTGRES_USER=postgres \
  -e POSTGRES_PASSWORD=postgres \
  -e POSTGRES_DB=postgres \
  -e PUID=@PUID@ \
  -e PGID=@PGID@ \
  -e TZ=@TZ@ \
  -v /path/to/containers/postgres/var/lib/postgresql/data:/var/lib/postgresql/data \
  ghcr.io/daemonless/postgres:latest

Access at: http://localhost:5432

Ansible

- name: Deploy postgres
  containers.podman.podman_container:
    name: postgres
    image: ghcr.io/daemonless/postgres:latest
    state: started
    restart_policy: always
    env:
      POSTGRES_USER: "postgres"
      POSTGRES_PASSWORD: "postgres"
      POSTGRES_DB: "postgres"
      PUID: "@PUID@"
      PGID: "@PGID@"
      TZ: "@TZ@"
    ports:
      - "5432:5432"
    volumes:
      - "/path/to/containers/postgres/var/lib/postgresql/data:/var/lib/postgresql/data"

Configuration

Environment Variables

Variable Default Description
POSTGRES_USER postgres Database superuser name (default: postgres)
POSTGRES_PASSWORD postgres Database superuser password
POSTGRES_DB postgres Default database to create (default: same as user)
PUID 1000
PGID 1000
TZ UTC

Volumes

Path Description
/var/lib/postgresql/data Database data directory

Ports

Port Protocol Description
5432 TCP PostgreSQL port

Notes

  • Architectures: amd64
  • User: bsd (UID/GID set via PUID/PGID)
  • Base: Built on ghcr.io/daemonless/base (FreeBSD)

About

Native FreeBSD OCI container image for PostgreSQL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors