Skip to content

Commit

Permalink
Mounted volume group ownership fix
Browse files Browse the repository at this point in the history
When attempting to host this image in K8S with a persistent volume, the permission on the postgres directory were not correct. 

```
 Error: The cluster is owned by group id *** which does not exist
```
  • Loading branch information
adyyoung authored Aug 12, 2024
1 parent f2d2fec commit 4fd346d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 4.4/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fi

# if we use a bind mount then the PG directory is empty and we have to create it
if [ ! -f /var/lib/postgresql/14/main/PG_VERSION ]; then
chown postgres /var/lib/postgresql/14/main
chown postgres:postgres /var/lib/postgresql/14/main
sudo -u postgres /usr/lib/postgresql/14/bin/initdb -D /var/lib/postgresql/14/main
fi

Expand Down

0 comments on commit 4fd346d

Please sign in to comment.