From d8c03055cdbb6561b587aa13e407e09abe38e931 Mon Sep 17 00:00:00 2001 From: Fu Zi Xiang Date: Sun, 14 Jan 2024 18:46:15 +0800 Subject: [PATCH] feat: update deployment docs --- deploy.env | 6 +----- doc/DEPLOYMENT.md | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/deploy.env b/deploy.env index 5ed243cc..469fd2db 100644 --- a/deploy.env +++ b/deploy.env @@ -73,9 +73,5 @@ PORTAINER_PASSWORD=password1234 CLOUDFLARE_TUNNEL_TOKEN= # If you are using a different postgres database, change the following values -# POSTGRES_USER= -# POSTGRES_DB= -# POSTGRES_PASSWORD= -# POSTGRES_HOST= -# GOTRUE_DATABASE_URL=postgres://supabase_auth_admin:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$POSTGRES_DB +# GOTRUE_DATABASE_URL=postgres://supabase_auth_admin:root@:/$POSTGRES_DB # APPFLOWY_DATABASE_URL=postgres://POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$POSTGRES_DB diff --git a/doc/DEPLOYMENT.md b/doc/DEPLOYMENT.md index cba34390..51d6c8dd 100644 --- a/doc/DEPLOYMENT.md +++ b/doc/DEPLOYMENT.md @@ -179,7 +179,20 @@ with your own in `nginx/ssl/` directory ## 5. FAQ - How do I use a different `postgres`? -1. You need set `APPFLOWY_DATABASE_URL` to another postgres url. -You also need to set `DATABASE_URL` to use the same postgres database. The default url is using the postgres in docker compose, in service `appflowy_cloud` and `gotrue` respectively. -2. You would need to run the initialization sql file from `migrations/before` in your hosted postgres. +However it is possible to change the database storage for it. The following steps are listed below. + +1. You need set `APPFLOWY_DATABASE_URL` to another postgres url. +``` +APPFLOWY_DATABASE_URL=postgres://:@:/ +``` + +2. You also need to set `GOTRUE_DATABASE_URL` to use the same postgres database. +``` +GOTRUE_DATABASE_URL=postgres://supabase_auth_admin:root@:/ +``` +- `supabase_auth_admin` and `root` must be kept in sync with the init migration scripts from `migrations/before`. +Currently it's possible to change the password, but probably can't change the username. +- `dbname` for `appflowy_cloud` and `gotrue` must be the same. + +3. You would need to run the initialization sql file from `migrations/before` in your hosted postgres.