Upgrade test db server from Fedora 38 to 41

This commit is contained in:
Brett Henderson
2024-12-28 14:42:38 +11:00
parent 552cb211fe
commit 21403479e7
2 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,4 @@
FROM fedora:38
FROM fedora:41
# Install UTF8 locale support
RUN dnf install -y glibc-langpack-en

View File

@ -1,9 +1,16 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail
DATADIR="/var/lib/pgsql/data"
# test if DATADIR has content
if [ ! "$(ls -A $DATADIR)" ]; then
# Create directory for the pgsql lock file. If we don't create this the lock file creation fails and the server startup fails.
# This has only been required since Fedora 41 (not required in Fedora 38).
mkdir /var/run/postgresql
chown postgres:postgres /var/run/postgresql
echo "Initializing Postgres Database at $DATADIR"
su postgres sh -lc "initdb --encoding=UTF-8 --locale=en_US.UTF-8"