mirror of
https://github.com/Dvorinka/excalidraw-full.git
synced 2026-06-03 22:02:57 +00:00
更新 .gitignore 文件以忽略 .htpasswd 文件,添加简单密码认证的使用说明到 README 文件中,包含示例命令和配置步骤,增强文档的可读性和实用性。
This commit is contained in:
committed by
Yuzhong Zhang
parent
3f10e749aa
commit
959f04400c
@@ -11,3 +11,4 @@ node_modules
|
|||||||
*.db
|
*.db
|
||||||
data/
|
data/
|
||||||
.idea
|
.idea
|
||||||
|
.htpasswd
|
||||||
|
|||||||
@@ -53,6 +53,33 @@ docker compose up -d
|
|||||||
|
|
||||||
The server will start, and you can access the application at `http://localhost:3002`.
|
The server will start, and you can access the application at `http://localhost:3002`.
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Summary Folded -->
|
||||||
|
<details>
|
||||||
|
<summary>Use Simple Password Authentication(Dex OIDC)</summary>
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Example for Linux
|
||||||
|
git clone https://github.com/BetterAndBetterII/excalidraw-full.git
|
||||||
|
cd excalidraw-full
|
||||||
|
mv .env.example .env
|
||||||
|
touch ./excalidraw.db # IMPORTANT: Initialize the SQLite DB, OTHERWISE IT WILL NOT START
|
||||||
|
docker compose -f docker-compose.dex.yml up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
Change your password in `.env` file.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# apt install apache2-utils
|
||||||
|
# Generate the password hash
|
||||||
|
echo YOUR_NEW_PASSWORD | htpasswd -BinC 10 admin | cut -d: -f2 > .htpasswd
|
||||||
|
# Update your .env file
|
||||||
|
sed -i 's/ADMIN_PASSWORD_HASH=.*/ADMIN_PASSWORD_HASH=$(cat .htpasswd)/' .env
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Configuration is managed via environment variables. For a full template, see the `.env.example` section below.
|
Configuration is managed via environment variables. For a full template, see the `.env.example` section below.
|
||||||
|
|||||||
@@ -53,6 +53,32 @@ docker compose up -d
|
|||||||
|
|
||||||
服务器将启动,您可以在 `http://localhost:3002` 访问该应用。
|
服务器将启动,您可以在 `http://localhost:3002` 访问该应用。
|
||||||
|
|
||||||
|
<!-- Summary Folded -->
|
||||||
|
<details>
|
||||||
|
<summary>使用简单密码认证(Dex OIDC)</summary>
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 示例
|
||||||
|
git clone https://github.com/BetterAndBetterII/excalidraw-full.git
|
||||||
|
cd excalidraw-full
|
||||||
|
mv .env.example .env
|
||||||
|
touch ./excalidraw.db # 重要:初始化 SQLite 数据库,否则无法启动
|
||||||
|
docker compose -f docker-compose.dex.yml up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
修改 `.env` 文件中的密码。
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# apt install apache2-utils
|
||||||
|
# 生成密码哈希
|
||||||
|
echo YOUR_NEW_PASSWORD | htpasswd -BinC 10 admin | cut -d: -f2 > .htpasswd
|
||||||
|
# 更新 .env 文件
|
||||||
|
sed -i 's/ADMIN_PASSWORD_HASH=.*/ADMIN_PASSWORD_HASH=$(cat .htpasswd)/' .env
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
## 配置
|
## 配置
|
||||||
|
|
||||||
配置通过环境变量进行管理。有关完整模板,请参阅下面的 `.env.example` 部分。
|
配置通过环境变量进行管理。有关完整模板,请参阅下面的 `.env.example` 部分。
|
||||||
|
|||||||
Reference in New Issue
Block a user