Skip to content

Commit 1fc8dd0

Browse files
authored
Merge pull request #1154 from AppFlowy-IO/fix-minio-redirect-url
fix: Minio redirect url shouldn't use API_EXTERNAL_URL
2 parents 527d91d + a096a03 commit 1fc8dd0

File tree

3 files changed

+14
-38
lines changed

3 files changed

+14
-38
lines changed

deploy.env

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# This file is a template for docker compose deployment
22
# Copy this file to .env and change the values as needed
33

4+
# Fully qualified domain name for the deployment. Replace localhost with your domain,
5+
# such as http://mydomain.com.
6+
FQDN=http://localhost
7+
48
# PostgreSQL Settings
59
POSTGRES_HOST=postgres
610
POSTGRES_USER=postgres
@@ -74,9 +78,8 @@ GOTRUE_ADMIN_PASSWORD=password
7478
# Set this to true if users can only join by invite
7579
GOTRUE_DISABLE_SIGNUP=false
7680

77-
# External URL where the GoTrue service is exposed. Replace `your-host` with your domain.
78-
# For example, if your host is `appflowy.home.com`, API_EXTERNAL_URL should be set to `http://appflowy.home.com/gotrue`
79-
API_EXTERNAL_URL=http://your-host/gotrue
81+
# External URL where the GoTrue service is exposed.
82+
API_EXTERNAL_URL=${FQDN}/gotrue
8083

8184
# GoTrue connect to postgres using this url. If your password contains special characters,
8285
# replace ${SUPABASE_PASSWORD} with the url encoded version. For example, `p@ssword` will become `p%40ssword`

doc/DEPLOYMENT.md

Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -68,34 +68,16 @@ cp deploy.env .env
6868
```
6969

7070
- Kindly read through the comments for each option
71-
- Modify the values in `.env` according to your needs
71+
- Modify the values in `.env` according to your needs. Minimally, you will have to update $FQDN
72+
to match your host server's domain, unless you are deploying on localhost.
7273

73-
For authentication details, refer to the [Authentication](./AUTHENTICATION.md) documentation. You will need to update
74-
the
75-
redirect URI to match your host server's public IP or hostname, such
76-
as `http://<your-host-server-public-ip-or-hostname>/gotrue/callback`.
77-
If using localhost, then just keep the default value.
74+
If you would like to use one of the identity providers to log in, refer to the [Authentication](./AUTHENTICATION.md) documentation.
7875

79-
```bash
80-
GOTRUE_EXTERNAL_GOOGLE_ENABLED=true
81-
GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID=
82-
GOTRUE_EXTERNAL_GOOGLE_SECRET=
83-
GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=http://your-host/gotrue/callback
84-
85-
# GitHub OAuth2
86-
GOTRUE_EXTERNAL_GITHUB_ENABLED=true
87-
GOTRUE_EXTERNAL_GITHUB_CLIENT_ID=your-github-client-id
88-
GOTRUE_EXTERNAL_GITHUB_SECRET=your-github-secret
89-
GOTRUE_EXTERNAL_GITHUB_REDIRECT_URI=http://your-host/gotrue/callback
90-
91-
# Discord OAuth2
92-
GOTRUE_EXTERNAL_DISCORD_ENABLED=true
93-
GOTRUE_EXTERNAL_DISCORD_CLIENT_ID=your-discord-client-id
94-
GOTRUE_EXTERNAL_DISCORD_SECRET=your-discord-secret
95-
GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI=http://your-host/gotrue/callback
96-
```
76+
If you would like to use magic link to log in, you will need to set up env variables related to SMTP.
9777

98-
### 3. Running the services
78+
If neither of the above are configured, then the only was to sign in is via the admin portal (the home page), using the admin email
79+
and password. After logging in as an admin, you can add users and set their passwords. The new user will be able to login to the admin
80+
portal using this credential.
9981

10082
#### Start and run AppFlowy-Cloud
10183

@@ -121,9 +103,6 @@ admin/debug tasks.
121103
- `portainer`/`portainer_init` (Web UI to provide some monitoring and ease of container management)
122104
- `tunnel` (Cloudflare tunnel to provide a secure way to connect AppFlowy to Cloudflare without a publicly routable IP
123105
address)
124-
- `admin_frontend` (admin portal to manage accounts and add authentication methods. We recommend to keep this)
125-
If you wish to deploy those, edit the file accordingly and do:
126-
127106
```
128107
docker compose --file docker-compose-extras.yml up -d
129108
```
@@ -224,12 +203,6 @@ by setting the `GOTRUE_DISABLE_SIGNUP` environment variable to `true`.
224203
The default configuration assumes that TLS is used for SMTP, typically on port 465. If you are using STARTTLS, such as when
225204
using port 587, please change `APPFLOWY_MAILER_SMTP_TLS_KIND` to `opportunistic`.
226205

227-
### Can I sign in using only using email and password?
228-
229-
The AppFlowy clients currently do not support email and password sign in. However, you can login to the admin portal using the admin
230-
email and password. In the admin section, you can then add users and set their passwords. Subseqently, users can login to the portal
231-
using their email and password, and launch the AppFlowy client via the portal.
232-
233206
### What functionality will I lose if the SMTP server is not set up?
234207

235208
Sign in via magic link will not be possible. Inviting users to workspace and accepting invitation will have to be

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
restart: on-failure
1818
image: minio/minio
1919
environment:
20-
- MINIO_BROWSER_REDIRECT_URL=${API_EXTERNAL_URL}/minio
20+
- MINIO_BROWSER_REDIRECT_URL=${FQDN?:err}/minio
2121
- MINIO_ROOT_USER=${APPFLOWY_S3_ACCESS_KEY:-minioadmin}
2222
- MINIO_ROOT_PASSWORD=${APPFLOWY_S3_SECRET_KEY:-minioadmin}
2323
command: server /data --console-address ":9001"

0 commit comments

Comments
 (0)