Skip to content

Commit

Permalink
📝 docs: Update docker-compose to use new LOGTO env (lobehub#4199)
Browse files Browse the repository at this point in the history
* Update docker-compose.mdx

* Update docker-compose.zh-CN.mdx
  • Loading branch information
SpeedupMaster authored Sep 29, 2024
1 parent 12dfead commit d05afb4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions docs/self-hosting/server-database/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ docker compose up -d
- `Redirect URI` should be `http://localhost:3210/api/auth/callback/logto`
- `Post sign-out redirect URI` should be `http://localhost:3210/`

3. Obtain the `App ID` and `App secrets`, and fill them into your `.env` file corresponding to `LOGTO_CLIENT_ID` and `LOGTO_CLIENT_SECRET`.
3. Obtain the `App ID` and `App secrets`, and fill them into your `.env` file corresponding to `AUTH_LOGTO_ID` and `AUTH_LOGTO_SECRET`.

### Configure MinIO S3

Expand Down Expand Up @@ -258,9 +258,9 @@ You need to first access the WebUI for configuration:
src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523"
/>

5. Obtain `App ID` and `App secrets`, and fill them into your `.env` file under `LOGTO_CLIENT_ID` and `LOGTO_CLIENT_SECRET`.
5. Obtain `App ID` and `App secrets`, and fill them into your `.env` file under `AUTH_LOGTO_ID` and `AUTH_LOGTO_SECRET`.

6. Set `LOGTO_ISSUER` in your `.env` file to `https://lobe-auth-api.example.com/oidc`.
6. Set `AUTH_LOGTO_ISSUER` in your `.env` file to `https://lobe-auth-api.example.com/oidc`.

<Image
alt="Configure environment variables"
Expand Down Expand Up @@ -349,8 +349,8 @@ To facilitate one-click copying, here are the example configuration files needed

```sh
# Logto secret
LOGTO_CLIENT_ID=
LOGTO_CLIENT_SECRET=
AUTH_LOGTO_ID=
AUTH_LOGTO_SECRET=
# MinIO S3 configuration
MINIO_ROOT_USER=YOUR_MINIO_USER
Expand Down Expand Up @@ -467,7 +467,7 @@ services:
- 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ='
- 'NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg'
- 'NEXTAUTH_URL=http://localhost:${LOBE_PORT}/api/auth'
- 'LOGTO_ISSUER=http://localhost:${LOGTO_PORT}/oidc'
- 'AUTH_LOGTO_ISSUER=http://localhost:${LOGTO_PORT}/oidc'
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
- 'S3_ENDPOINT=http://localhost:${MINIO_PORT}'
- 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
Expand Down Expand Up @@ -519,9 +519,9 @@ NEXTAUTH_URL=https://lobe.example.com/api/auth
# NextAuth providers configuration (example using Logto)
# For other providers, see: https://lobehub.com/docs/self-hosting/environment-variables/auth
LOGTO_CLIENT_ID=YOUR_LOGTO_CLIENT_ID
LOGTO_CLIENT_SECRET=YOUR_LOGTO_CLIENT_SECRET
LOGTO_ISSUER=https://lobe-auth-api.example.com/oidc
AUTH_LOGTO_ID=YOUR_LOGTO_CLIENT_ID
AUTH_LOGTO_SECRET=YOUR_LOGTO_CLIENT_SECRET
AUTH_LOGTO_ISSUER=https://lobe-auth-api.example.com/oidc
# Proxy settings (if needed, e.g., when using GitHub as an auth provider)
# HTTP_PROXY=http://localhost:7890
Expand Down
18 changes: 9 additions & 9 deletions docs/self-hosting/server-database/docker-compose.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ docker compose up -d
- `Redirect URI``http://localhost:3210/api/auth/callback/logto`
- `Post sign-out redirect URI``http://localhost:3210/`

3. 获取 `App ID``App secrets`,填入 `.env` 文件中对应的 `LOGTO_CLIENT_ID``LOGTO_CLIENT_SECRETT`
3. 获取 `App ID``App secrets`,填入 `.env` 文件中对应的 `AUTH_LOGTO_ID``AUTH_LOGTO_SECRET`

### 配置 MinIO S3

Expand Down Expand Up @@ -256,9 +256,9 @@ docker compose up -d # 重新启动
src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523"
/>

5. 获取 `App ID``App secrets`,填入你的 `.env` 文件中的 `LOGTO_CLIENT_ID``LOGTO_CLIENT_SECRETT`
5. 获取 `App ID``App secrets`,填入你的 `.env` 文件中的 `AUTH_LOGTO_ID``AUTH_LOGTO_SECRET`

6. 配置你的 `.env` 文件中 `LOGTO_ISSUER``https://lobe-auth-api.example.com/oidc`
6. 配置你的 `.env` 文件中 `AUTH_LOGTO_ISSUER``https://lobe-auth-api.example.com/oidc`

<Image
alt="配置 Logto 环境变量"
Expand Down Expand Up @@ -346,8 +346,8 @@ docker compose up -d # 重新启动

```sh
# Logto secret
LOGTO_CLIENT_ID=
LOGTO_CLIENT_SECRET=
AUTH_LOGTO_ID=
AUTH_LOGTO_SECRET=
# MinIO S3 配置
MINIO_ROOT_USER=YOUR_MINIO_USER
Expand Down Expand Up @@ -464,7 +464,7 @@ services:
- 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ='
- 'NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg'
- 'NEXTAUTH_URL=http://localhost:${LOBE_PORT}/api/auth'
- 'LOGTO_ISSUER=http://localhost:${LOGTO_PORT}/oidc'
- 'AUTH_LOGTO_ISSUER=http://localhost:${LOGTO_PORT}/oidc'
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
- 'S3_ENDPOINT=http://localhost:${MINIO_PORT}'
- 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
Expand Down Expand Up @@ -515,9 +515,9 @@ NEXTAUTH_URL=https://lobe.example.com/api/auth
# NextAuth 鉴权服务提供商部分,以 Logto 为例
# 其他鉴权服务提供商所需的环境变量,请参考:https://lobehub.com/zh/docs/self-hosting/environment-variables/auth
LOGTO_CLIENT_ID=YOUR_LOGTO_CLIENT_ID
LOGTO_CLIENT_SECRET=YOUR_LOGTO_CLIENT_SECRET
LOGTO_ISSUER=https://lobe-auth-api.example.com/oidc
AUTH_LOGTO_ID=YOUR_LOGTO_CLIENT_ID
AUTH_LOGTO_SECRET=YOUR_LOGTO_CLIENT_SECRET
AUTH_LOGTO_ISSUER=https://lobe-auth-api.example.com/oidc
# 代理相关,如果你需要的话(比如你使用 GitHub 作为鉴权服务提供商)
# HTTP_PROXY=http://localhost:7890
Expand Down

0 comments on commit d05afb4

Please sign in to comment.