Skip to content

Commit

Permalink
Postgresql fixes (#260)
Browse files Browse the repository at this point in the history
* Adjust PERL5LIB path so `psql` works interactively
* Adjust `/lib/systemd/system/[email protected]` so postgresql waits for the network to be online, in order to prevent situations where it doesn't bind to the IP address on the NIC.
  • Loading branch information
kreeuwijk authored Aug 28, 2024
1 parent ef3c2c6 commit b9fb333
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,10 @@ provider-image:
curl -L https://github.com/k3s-io/kine/releases/download/v${KINE_VERSION}/kine-amd64 | install -m 755 /dev/stdin /opt/spectrocloud/bin/kine

# Ensure psql works ootb for the postgres user
RUN su postgres -c 'echo "export PERL5LIB=/usr/share/perl/5.34:/usr/share/perl5:/usr/lib/x86_64-linux-gnu/perl/5.34" > ~/.bash_profile'
RUN su postgres -c 'echo "export PERL5LIB=/usr/share/perl/5.34:/etc/perl:/usr/lib/x86_64-linux-gnu/perl5/5.34:/usr/share/perl5:/usr/lib/x86_64-linux-gnu/perl/5.34:/usr/lib/x86_64-linux-gnu/perl-base" > ~/.bash_profile'

# Ensure psql waits for the network to be online
RUN sed -i 's/After=network.target/After=network-online.target/' /lib/systemd/system/[email protected]
END

SAVE IMAGE --push $IMAGE_PATH
Expand Down

0 comments on commit b9fb333

Please sign in to comment.