use ubuntu postgres base image (pg13)

This commit is contained in:
Ed Chalstrey 2022-02-11 11:24:50 +00:00
parent 55151524d0
commit 02745d3f1f
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ services:
- "8080:8080"
db:
container_name: postgres-colouring-london
image: postgres:14
image: ubuntu/postgres:13-21.10_beta
ports:
- "5432:5432"
volumes:

View File

@ -2,11 +2,11 @@
service postgresql start
sudo apt-get install -y postgresql-contrib libpq-dev postgis
sudo apt-get install -y postgresql-14-postgis-3
sudo apt-get install -y postgresql-13-postgis-3
sudo apt-get install -y gdal-bin libspatialindex-dev libgeos-dev libproj-dev
sudo sed -i "s/#\?listen_address.*/listen_addresses '*'/" /etc/postgresql/14/main/postgresql.conf
echo "host all all all md5" | sudo tee --append /etc/postgresql/14/main/pg_hba.conf > /dev/null
sudo sed -i "s/#\?listen_address.*/listen_addresses '*'/" /etc/postgresql/13/main/postgresql.conf
echo "host all all all md5" | sudo tee --append /etc/postgresql/13/main/pg_hba.conf > /dev/null
service postgresql restart
sudo -u postgres psql -c "SELECT 1 FROM pg_user WHERE usename = 'dockeruser';" | grep -q 1 || sudo -u postgres psql -c "CREATE ROLE dockeruser SUPERUSER LOGIN PASSWORD 'postgres';"