Skip to content

Commit

Permalink
feat: change bootstrap user to supabase_admin upon upgrade (#1125)
Browse files Browse the repository at this point in the history
* feat: change bootstrap user to supabase_admin upon upgrade

* chore: bump version

* fix: account for procedures

* fix: only update pg_hba.conf if needed

* chore: persist file in pg_upgrade_scripts directory; run only when targeting PG16

* chore: revert PG16 gating

* Revert "chore: persist file in pg_upgrade_scripts directory; run only when targeting PG16"

This reverts commit 376a934.

* Update common-nix.vars.pkr.hcl

---------

Co-authored-by: Paul Cioanca <[email protected]>
  • Loading branch information
soedirgo and pcnc authored Sep 11, 2024
1 parent d2fd531 commit ab7f879
Show file tree
Hide file tree
Showing 17 changed files with 484 additions and 38 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
target: production
build-args: |
${{ steps.args.outputs.result }}
tags: supabase/postgres:${{ steps.settings.outputs.postgres-version }}
tags: supabase/postgres:${{ steps.settings.outputs.postgres-version }},supabase_postgres
cache-from: |
type=gha,scope=${{ github.ref_name }}-${{ steps.settings.outputs.postgres-version }}-${{ matrix.arch }}
type=gha,scope=${{ github.base_ref }}-${{ steps.settings.outputs.postgres-version }}-${{ matrix.arch }}
Expand Down Expand Up @@ -107,10 +107,6 @@ jobs:
PGUSER: supabase_admin
PGPASSWORD: ${{ env.POSTGRES_PASSWORD }}

schema:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: verify schema.sql is committed
run: |
docker compose -f migrations/docker-compose.yaml up db dbmate --abort-on-container-exit
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile-156
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ STOPSIGNAL SIGINT
EXPOSE 5432

ENV POSTGRES_HOST=/var/run/postgresql
ENV POSTGRES_USER=supabase_admin
ENV POSTGRES_DB=postgres
RUN apt-get update && apt-get install -y --no-install-recommends \
locales \
&& rm -rf /var/lib/apt/lists/* && \
Expand All @@ -219,4 +221,3 @@ ENV LC_CTYPE=C.UTF-8
ENV LC_COLLATE=C.UTF-8
ENV LOCALE_ARCHIVE /usr/lib/locale/locale-archive
CMD ["postgres", "-D", "/etc/postgresql"]

Loading

0 comments on commit ab7f879

Please sign in to comment.