Skip to content

Commit

Permalink
Upgrade test db server from Fedora 38 to 41
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett Henderson authored and Brett Henderson committed Dec 28, 2024
1 parent 552cb21 commit 2140347
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build-support/docker/db/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fedora:38
FROM fedora:41

# Install UTF8 locale support
RUN dnf install -y glibc-langpack-en
Expand Down
9 changes: 8 additions & 1 deletion build-support/docker/db/docker-start.sh
Original file line number Diff line number Diff line change
@@ -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"

Expand Down

0 comments on commit 2140347

Please sign in to comment.