Skip to content

Postgres 15

A default Postgres install that is not really editable.

Report an issue
updated
variables
2
images
1
author
parker@parkervcp.com
sha256
491103441577

Readme

PostgreSQL

From their Website

The World's Most Advanced Open Source Relational Database

Minimum RAM warning

2 Gigabytes minimum recommended

See here https://www.commandprompt.com/blog/postgresql_mininum_requirements/

Server Ports

Ports required to run the server in a table format.

Port default
Server 5432

Startup command

postgres -D /home/container/postgres_db/ & wait-port; psql -h127.0.0.1 -p{{SERVER_PORT}} --dbname postgres

The parts in blue are filled in by the panel when the server starts, from the variables below.

Docker image

  • ghcr.io/ptero-eggs/yolks:postgres_15

1 contributor

Variables

2 settings

  • Superuser Name

    The username for the postgres superuser

    env
    PGUSER
    default
    pterodactyl
    rules
    required|string|max:20
    • viewable
  • Superuser Password

    The postgres super user password with a strong default. You should be generating new ones for each server. If you don't then users can hit other users DB's

    env
    PGPASSWORD
    default
    Pl3453Ch4n63M3!
    rules
    required|string|max:20
    • viewable
Installation script 15 lines container postgres:15-alpine entrypoint bash show
#! /bin/ash
adduser -D -h /home/container container

chown -R container: /mnt/server/

su container -c 'initdb -D /mnt/server/postgres_db/ -A md5 -U "$PGUSER" --pwfile=<(echo "$PGPASSWORD")'

mkdir -p /mnt/server/postgres_db/run/

## Add default "allow from all" auth rule to pg_hba
if ! grep -q "# Custom rules" "/mnt/server/postgres_db/pg_hba.conf"; then
    echo -e "# Custom rules\nhost    all             all             0.0.0.0/0               md5" >> "/mnt/server/postgres_db/pg_hba.conf"
fi

echo -e "Done"