Skip to content

Commit 67b202d

Browse files
committed
add changes to pg 17 Dockerfile
1 parent 62dd28f commit 67b202d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Dockerfile-17

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ RUN sed -i \
181181
echo "pgsodium.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \
182182
echo "vault.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \
183183
echo 'auto_explain.log_min_duration = 10s' >> /etc/postgresql/postgresql.conf && \
184+
# Remove supabase_admin line from pg_hba.conf
185+
sed -i '/local all supabase_admin scram-sha-256/d' /etc/postgresql/pg_hba.conf && \
186+
# Add supabase_admin mappings block to pg_ident.conf before supabase-specific users
187+
sed -i '/# supabase-specific users/i\# supabase_admin user mappings\nsupabase_map postgres supabase_admin\nsupabase_map root supabase_admin\nsupabase_map ubuntu supabase_admin\n' /etc/postgresql/pg_ident.conf && \
184188
usermod -aG postgres wal-g && \
185189
mkdir -p /etc/postgresql-custom && \
186190
chown postgres:postgres /etc/postgresql-custom
@@ -202,7 +206,9 @@ COPY ansible/files/stat_extension.sql /docker-entrypoint-initdb.d/migrations/00-
202206
COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu
203207
ADD --chmod=0755 \
204208
https://github.com/docker-library/postgres/raw/master/17/bullseye/docker-entrypoint.sh \
205-
/usr/local/bin/
209+
/usr/local/bin/upstream-docker-entrypoint.sh
210+
# # Add custom entrypoint script
211+
COPY --chmod=0755 docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
206212

207213
RUN mkdir -p /var/run/postgresql && chown postgres:postgres /var/run/postgresql
208214

0 commit comments

Comments
 (0)