Skip to content

Commit 36ed38e

Browse files
author
Vidas P
committed
Fix directory permissions when in rootless mode
1 parent 361ede9 commit 36ed38e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docker/scripts/entrypoint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ export RAILS_ENV=production
55

66
# Start internal postgres if no database is configured.
77
if [ -z "${DATABASE_HOST}" ] && [ -z "${DATABASE_URL}" ]; then
8+
# Fix directory permissions when running not as root.
9+
chown postgres:postgres /var/lib/postgresql/11/main
810
/etc/init.d/postgresql start
911
echo -n 'Waiting for postgres to be ready'
1012
until runuser -l postgres -c 'pg_isready' 2>/dev/null; do

0 commit comments

Comments
 (0)