File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ node_modules
1010* /build /*
1111* .db
1212data /
13+ .htpasswd
Original file line number Diff line number Diff line change @@ -53,6 +53,33 @@ docker compose up -d
5353
5454The server will start, and you can access the application at ` http://localhost:3002 ` .
5555
56+
57+ <!-- Summary Folded -->
58+ <details >
59+ <summary >Use Simple Password Authentication(Dex OIDC)</summary >
60+
61+ ``` bash
62+ # Example for Linux
63+ git clone https://github.com/BetterAndBetterII/excalidraw-full.git
64+ cd excalidraw-full
65+ mv .env.example .env
66+ touch ./excalidraw.db # IMPORTANT: Initialize the SQLite DB, OTHERWISE IT WILL NOT START
67+ docker compose -f docker-compose.dex.yml up -d
68+ ```
69+
70+ Change your password in ` .env ` file.
71+
72+ ``` bash
73+ # apt install apache2-utils
74+ # Generate the password hash
75+ echo YOUR_NEW_PASSWORD | htpasswd -BinC 10 admin | cut -d: -f2 > .htpasswd
76+ # Update your .env file
77+ sed -i ' s/ADMIN_PASSWORD_HASH=.*/ADMIN_PASSWORD_HASH=$(cat .htpasswd)/' .env
78+ ```
79+
80+ </details >
81+
82+
5683## Configuration
5784
5885Configuration is managed via environment variables. For a full template, see the ` .env.example ` section below.
Original file line number Diff line number Diff line change @@ -53,6 +53,32 @@ docker compose up -d
5353
5454服务器将启动,您可以在 ` http://localhost:3002 ` 访问该应用。
5555
56+ <!-- Summary Folded -->
57+ <details >
58+ <summary >使用简单密码认证(Dex OIDC)</summary >
59+
60+ ``` bash
61+ # 示例
62+ git clone https://github.com/BetterAndBetterII/excalidraw-full.git
63+ cd excalidraw-full
64+ mv .env.example .env
65+ touch ./excalidraw.db # 重要:初始化 SQLite 数据库,否则无法启动
66+ docker compose -f docker-compose.dex.yml up -d
67+ ```
68+
69+ 修改 ` .env ` 文件中的密码。
70+
71+ ``` bash
72+ # apt install apache2-utils
73+ # 生成密码哈希
74+ echo YOUR_NEW_PASSWORD | htpasswd -BinC 10 admin | cut -d: -f2 > .htpasswd
75+ # 更新 .env 文件
76+ sed -i ' s/ADMIN_PASSWORD_HASH=.*/ADMIN_PASSWORD_HASH=$(cat .htpasswd)/' .env
77+ ```
78+
79+ </details >
80+
81+
5682## 配置
5783
5884配置通过环境变量进行管理。有关完整模板,请参阅下面的 ` .env.example ` 部分。
You can’t perform that action at this time.
0 commit comments