fix: allow gotrue service to work without postgres user

This commit is contained in:
khorshuheng 2024-10-23 16:36:46 +08:00
parent f74b6a37bd
commit e767f36a2f
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