This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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' |