Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Aug 25, 2023
1 parent edc9db9 commit cb458ad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
20 changes: 16 additions & 4 deletions linux/step01_rocky9_pg_deps.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
#!/bin/bash

# pg 13 is installed by default
yum -y install postgresql-server postgresql
/usr/bin/postgresql-setup --initdb

sed -i 's/ ident/ trust/g' /var/lib/pgsql/data/pg_hba.conf
if [ "${container:-}" = docker ]; then
su - postgres -c "/usr/bin/initdb -D /var/lib/pgsql/data --encoding=UTF8"
echo "listen_addresses='*'" >> /var/lib/pgsql/data/postgresql.conf
else
PGSETUP_INITDB_OPTIONS=--encoding=UTF8 /usr/bin/postgresql-setup --initdb
fi
sed -i.bak -re 's/^(host.*)ident/\1md5/' /var/lib/pgsql/data/pg_hba.conf

if [ "${container:-}" = docker ]; then
su - postgres -c "/usr/bin/pg_ctl start -D /var/lib/pgsql/data -w"
else
systemctl start postgresql
fi
systemctl enable postgresql

systemctl enable postgresql
systemctl start postgresql
sed -i 's/ ident/ trust/g' /var/lib/pgsql/data/pg_hba.conf
2 changes: 2 additions & 0 deletions linux/test/rockylinux9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ ARG JAVAVER=openjdk11
ARG ICEVER=ice36
ARG PGVER=pg14

# This is so that scripts can detect whether they're in docker
RUN echo 'export container=docker' > /etc/profile.d/docker.sh

ADD omero-install-test.zip /
RUN dnf -y install unzip && unzip omero-install-test.zip
Expand Down

0 comments on commit cb458ad

Please sign in to comment.