Skip to content

Instantly share code, notes, and snippets.

@Redax94
Redax94 / 01-create-notify-db.sh
Last active May 2, 2026 16:55
Paldax Financial — standalone docker-compose for self-hosted deploy
#!/usr/bin/env bash
# Postgres entry point runs every executable in /docker-entrypoint-initdb.d
# on the FIRST initialisation only (i.e. when the data dir is empty).
# Reusing the same role / password as Paldax keeps env handling simple;
# the separate logical database means notify-relay's outbox is dropped /
# restored independently of Paldax data.
set -euo pipefail
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-'SQL'
SELECT 'CREATE DATABASE notify_relay'