增加dozzle的密码配置教程
This commit is contained in:
parent
6c492d8183
commit
2635ddb567
12
README.md
12
README.md
@ -93,7 +93,7 @@ chmod +x update.sh
|
|||||||
|
|
||||||
1. 优化日志管理功能,使用单独的容器和模块来进行管理,不占用主进程文件写入性能
|
1. 优化日志管理功能,使用单独的容器和模块来进行管理,不占用主进程文件写入性能
|
||||||
2, 更新步骤:
|
2, 更新步骤:
|
||||||
- 本次docker-compose新增dozzle容器,将docker-compose文件更新到最新
|
- 本次`docker-compose.yml`新增dozzle容器,将`docker-compose.yml`文件更新到最新
|
||||||
- 在nginx配置文件中(/etc/nginx/conf.d/easyai-proxy.conf)添加如下配置,具体添加位置参考`easyai-proxy.conf.sample`
|
- 在nginx配置文件中(/etc/nginx/conf.d/easyai-proxy.conf)添加如下配置,具体添加位置参考`easyai-proxy.conf.sample`
|
||||||
```nginx configuration
|
```nginx configuration
|
||||||
location /logs-web/ {
|
location /logs-web/ {
|
||||||
@ -106,6 +106,16 @@ chmod +x update.sh
|
|||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
3. 默认不启用密码。如果启用密码,取消`docker-compose.yml`中的`DOZZLE_AUTH_PROVIDER: simple`的注释,默认密码为`123456`,用户名为`admin`。
|
||||||
|
4. 修改默认密码,使用下面的命令生成密码:(替换admin和密码为实际的用户名和密码)
|
||||||
|
```bash
|
||||||
|
docker run -it --rm registry.cn-shanghai.aliyuncs.com/easyaigc/dozzle:latest generate admin --password 密码
|
||||||
|
```
|
||||||
|
5. 用生成的密码填入/data/users.yml中的password
|
||||||
|
6. 重启docker服务
|
||||||
|
```bash
|
||||||
|
docker compose up -d #或者docker compose 版本不一样可能为:docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### 2025.12.27
|
### 2025.12.27
|
||||||
|
|||||||
7
data/users.yml
Normal file
7
data/users.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
users:
|
||||||
|
admin:
|
||||||
|
email: me@email.net
|
||||||
|
name: admin
|
||||||
|
password: $2a$11$xLr1374UPjTUzlSdFVjCnuUldYvR1k6ne1pl/hVgbMiwaBbn.Yn2G
|
||||||
|
filter:
|
||||||
|
roles:
|
||||||
@ -265,8 +265,11 @@ services:
|
|||||||
image: registry.cn-shanghai.aliyuncs.com/easyaigc/dozzle:latest
|
image: registry.cn-shanghai.aliyuncs.com/easyaigc/dozzle:latest
|
||||||
environment:
|
environment:
|
||||||
DOZZLE_BASE: /logs-web
|
DOZZLE_BASE: /logs-web
|
||||||
|
# DOZZLE_AUTH_PROVIDER: simple
|
||||||
|
DOZZLE_AUTH_TTL: 72h
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- ./data:/data
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
# portainer:
|
# portainer:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user