Merge pull request #923 from AppFlowy-IO/issue-839

fix: allow gotrue service to work without postgres user
This commit is contained in:
Khor Shu Heng 2024-10-23 17:51:39 +08:00 committed by GitHub
commit 30ff066ba7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 5 deletions

View File

@ -41,7 +41,7 @@ jobs:
- name: Build and Push GoTrue
run: |
export TAG=${GITHUB_REF#refs/*/}
docker buildx build --platform linux/amd64,linux/arm64 -t appflowyinc/gotrue:${TAG} -t appflowyinc/gotrue:latest -f docker/gotrue.Dockerfile --push .
docker buildx build --platform linux/amd64,linux/arm64 -t appflowyinc/gotrue:${TAG} -t appflowyinc/gotrue:latest -f gotrue/Dockerfile --push docker/gotrue
appflowy_cloud_image:
runs-on: ubuntu-22.04

View File

@ -43,8 +43,8 @@ services:
gotrue:
restart: on-failure
build:
context: .
dockerfile: docker/gotrue.Dockerfile
context: docker/gotrue
dockerfile: docker/gotrue/Dockerfile
image: appflowyinc/gotrue:${GOTRUE_VERSION:-latest}
environment:
# There are a lot of options to configure GoTrue. You can reference the example config:

View File

@ -2,9 +2,10 @@ FROM golang as base
WORKDIR /go/src/supabase
RUN git clone https://github.com/supabase/auth.git --depth 1 --branch v2.159.1
WORKDIR /go/src/supabase/auth
COPY docker/gotrue.patch .
RUN git apply gotrue.patch
COPY patch/mfa_enabled.patch .
RUN git apply mfa_enabled.patch
RUN CGO_ENABLED=0 go build -o /auth .
RUN rm /go/src/supabase/auth/migrations/20240612123726_enable_rls_update_grants.up.sql
FROM scratch
COPY --from=base /usr/share/zoneinfo /usr/share/zoneinfo