Skip to content

Commit

Permalink
Add preparation of postgresql to ubuntu base
Browse files Browse the repository at this point in the history
  • Loading branch information
oz123 committed Dec 20, 2023
1 parent 443d564 commit e2f7dfb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@ base-image:
rm postgresql.asc && \
apt update && \
apt install -y postgresql-16 postgresql-contrib-16 iputils-ping && \
# prepare postgresql for replication
sed -i '/^#wal_level = replica/ s/#wal_level = replica/wal_level = logical/' /etc/postgresql/16/main/postgresql.conf
sed -i '/^#max_worker_processes = 8/ s/#max_worker_processes = 8/max_worker_processes = 16/' /etc/postgresql/16/main/postgresql.conf
sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" /etc/postgresql/16/main/postgresql.conf
echo "host all all 0.0.0.0/0 md5" | sudo tee -a /etc/postgresql/16/main/pg_hba.conf
systemctl enable postgresql
END
END
Expand Down Expand Up @@ -317,6 +322,7 @@ base-image:
RUN zypper --non-interactive --quiet addrepo --refresh -p 90 http://download.opensuse.org/repositories/server:database:postgresql/openSUSE_Tumbleweed/ PostgreSQL && \
zypper --gpg-auto-import-keys ref && \
zypper install -y postgresql-16 postgresql-server-16 postgresql-contrib iputils && \
# TODO: find out how to prepare postgresql for replication in suse
systemctl enable postresql
END
END
Expand Down

0 comments on commit e2f7dfb

Please sign in to comment.