File tree 11 files changed +77
-0
lines changed 11 files changed +77
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
36
36
mkdir -p /var/run/postgresql
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
+ # Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
40
+ if [ " $POSTGRES_XLOG_DIR " ]; then
41
+ mkdir -p " $POSTGRES_XLOG_DIR "
42
+ chmod 700 " $POSTGRES_XLOG_DIR "
43
+ chown -R postgres " $POSTGRES_XLOG_DIR "
44
+ POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_XLOG_DIR "
45
+ fi
39
46
40
47
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
48
fi
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
36
36
mkdir -p /var/run/postgresql
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
+ # Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
40
+ if [ " $POSTGRES_XLOG_DIR " ]; then
41
+ mkdir -p " $POSTGRES_XLOG_DIR "
42
+ chmod 700 " $POSTGRES_XLOG_DIR "
43
+ chown -R postgres " $POSTGRES_XLOG_DIR "
44
+ POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_XLOG_DIR "
45
+ fi
39
46
40
47
exec gosu postgres " $BASH_SOURCE " " $@ "
41
48
fi
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
36
36
mkdir -p /var/run/postgresql
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
+ # Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
40
+ if [ " $POSTGRES_XLOG_DIR " ]; then
41
+ mkdir -p " $POSTGRES_XLOG_DIR "
42
+ chmod 700 " $POSTGRES_XLOG_DIR "
43
+ chown -R postgres " $POSTGRES_XLOG_DIR "
44
+ POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_XLOG_DIR "
45
+ fi
39
46
40
47
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
48
fi
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
36
36
mkdir -p /var/run/postgresql
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
+ # Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
40
+ if [ " $POSTGRES_XLOG_DIR " ]; then
41
+ mkdir -p " $POSTGRES_XLOG_DIR "
42
+ chmod 700 " $POSTGRES_XLOG_DIR "
43
+ chown -R postgres " $POSTGRES_XLOG_DIR "
44
+ POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_XLOG_DIR "
45
+ fi
39
46
40
47
exec gosu postgres " $BASH_SOURCE " " $@ "
41
48
fi
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
36
36
mkdir -p /var/run/postgresql
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
+ # Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
40
+ if [ " $POSTGRES_XLOG_DIR " ]; then
41
+ mkdir -p " $POSTGRES_XLOG_DIR "
42
+ chmod 700 " $POSTGRES_XLOG_DIR "
43
+ chown -R postgres " $POSTGRES_XLOG_DIR "
44
+ POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_XLOG_DIR "
45
+ fi
39
46
40
47
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
48
fi
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
36
36
mkdir -p /var/run/postgresql
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
+ # Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
40
+ if [ " $POSTGRES_XLOG_DIR " ]; then
41
+ mkdir -p " $POSTGRES_XLOG_DIR "
42
+ chmod 700 " $POSTGRES_XLOG_DIR "
43
+ chown -R postgres " $POSTGRES_XLOG_DIR "
44
+ POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_XLOG_DIR "
45
+ fi
39
46
40
47
exec gosu postgres " $BASH_SOURCE " " $@ "
41
48
fi
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
36
36
mkdir -p /var/run/postgresql
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
+ # Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
40
+ if [ " $POSTGRES_XLOG_DIR " ]; then
41
+ mkdir -p " $POSTGRES_XLOG_DIR "
42
+ chmod 700 " $POSTGRES_XLOG_DIR "
43
+ chown -R postgres " $POSTGRES_XLOG_DIR "
44
+ POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_XLOG_DIR "
45
+ fi
39
46
40
47
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
48
fi
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
36
36
mkdir -p /var/run/postgresql
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
+ # Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
40
+ if [ " $POSTGRES_XLOG_DIR " ]; then
41
+ mkdir -p " $POSTGRES_XLOG_DIR "
42
+ chmod 700 " $POSTGRES_XLOG_DIR "
43
+ chown -R postgres " $POSTGRES_XLOG_DIR "
44
+ POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_XLOG_DIR "
45
+ fi
39
46
40
47
exec gosu postgres " $BASH_SOURCE " " $@ "
41
48
fi
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
36
36
mkdir -p /var/run/postgresql
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
+ # Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
40
+ if [ " $POSTGRES_XLOG_DIR " ]; then
41
+ mkdir -p " $POSTGRES_XLOG_DIR "
42
+ chmod 700 " $POSTGRES_XLOG_DIR "
43
+ chown -R postgres " $POSTGRES_XLOG_DIR "
44
+ POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_XLOG_DIR "
45
+ fi
39
46
40
47
exec su-exec postgres " $BASH_SOURCE " " $@ "
41
48
fi
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
36
36
mkdir -p /var/run/postgresql
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
+ # Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
40
+ if [ " $POSTGRES_XLOG_DIR " ]; then
41
+ mkdir -p " $POSTGRES_XLOG_DIR "
42
+ chmod 700 " $POSTGRES_XLOG_DIR "
43
+ chown -R postgres " $POSTGRES_XLOG_DIR "
44
+ POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_XLOG_DIR "
45
+ fi
39
46
40
47
exec gosu postgres " $BASH_SOURCE " " $@ "
41
48
fi
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then
36
36
mkdir -p /var/run/postgresql
37
37
chown -R postgres /var/run/postgresql
38
38
chmod g+s /var/run/postgresql
39
+ # Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user
40
+ if [ " $POSTGRES_XLOG_DIR " ]; then
41
+ mkdir -p " $POSTGRES_XLOG_DIR "
42
+ chmod 700 " $POSTGRES_XLOG_DIR "
43
+ chown -R postgres " $POSTGRES_XLOG_DIR "
44
+ POSTGRES_INITDB_ARGS=" $POSTGRES_INITDB_ARGS --xlogdir $POSTGRES_XLOG_DIR "
45
+ fi
39
46
40
47
exec gosu postgres " $BASH_SOURCE " " $@ "
41
48
fi
You can’t perform that action at this time.
0 commit comments