Skip to content

Commit d8c0305

Browse files
committed
feat: update deployment docs
1 parent 8ba4559 commit d8c0305

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

deploy.env

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,5 @@ PORTAINER_PASSWORD=password1234
7373
CLOUDFLARE_TUNNEL_TOKEN=
7474

7575
# If you are using a different postgres database, change the following values
76-
# POSTGRES_USER=
77-
# POSTGRES_DB=
78-
# POSTGRES_PASSWORD=
79-
# POSTGRES_HOST=
80-
# GOTRUE_DATABASE_URL=postgres://supabase_auth_admin:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$POSTGRES_DB
76+
# GOTRUE_DATABASE_URL=postgres://supabase_auth_admin:root@<host>:<port>/$POSTGRES_DB
8177
# APPFLOWY_DATABASE_URL=postgres://POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$POSTGRES_DB

doc/DEPLOYMENT.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,20 @@ with your own in `nginx/ssl/` directory
179179

180180
## 5. FAQ
181181
- How do I use a different `postgres`?
182-
1. You need set `APPFLOWY_DATABASE_URL` to another postgres url.
183-
You also need to set `DATABASE_URL` to use the same postgres database.
184182
The default url is using the postgres in docker compose, in service `appflowy_cloud` and `gotrue` respectively.
185-
2. You would need to run the initialization sql file from `migrations/before` in your hosted postgres.
183+
However it is possible to change the database storage for it. The following steps are listed below.
184+
185+
1. You need set `APPFLOWY_DATABASE_URL` to another postgres url.
186+
```
187+
APPFLOWY_DATABASE_URL=postgres://<postgres_user>:<password>@<host>:<port>/<dbname>
188+
```
189+
190+
2. You also need to set `GOTRUE_DATABASE_URL` to use the same postgres database.
191+
```
192+
GOTRUE_DATABASE_URL=postgres://supabase_auth_admin:root@<host>:<port>/<dbname>
193+
```
194+
- `supabase_auth_admin` and `root` must be kept in sync with the init migration scripts from `migrations/before`.
195+
Currently it's possible to change the password, but probably can't change the username.
196+
- `dbname` for `appflowy_cloud` and `gotrue` must be the same.
197+
198+
3. You would need to run the initialization sql file from `migrations/before` in your hosted postgres.

0 commit comments

Comments
 (0)