chore: add env before docker-compose

This commit is contained in:
WWWw 2024-08-25 20:06:57 +08:00 committed by GitHub
parent 3c5b6978a3
commit 67baea23a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,12 +33,6 @@ mlikiowa/napcat-docker:latest
### docker-compose 运行
使用以下命令生成 `.env` 文件
```shell
echo "NAPCAT_UID=$(id -u)" > .env
echo "NAPCAT_GID=$(id -g)" >> .env
```
创建 `docker-compose.yml` 文件
```yaml
# docker-compose.yml
@ -59,7 +53,7 @@ services:
image: mlikiowa/napcat-docker:latest
```
使用 `docker-compose up -d` 运行到后台
使用 `NAPCAT_UID=$(id -u); NAPCAT_GID=$(id -g); docker-compose up -d` 运行到后台
## 反向 WS
<details>
@ -100,7 +94,7 @@ services:
image: mlikiowa/napcat-docker:latest
```
使用 `docker-compose up -d` 运行到后台
使用 `NAPCAT_UID=$(id -u); NAPCAT_GID=$(id -g); docker-compose up -d` 运行到后台
</details>
## HTTP
@ -148,7 +142,7 @@ services:
image: mlikiowa/napcat-docker:latest
```
使用 `docker-compose up -d` 运行到后台
使用 `NAPCAT_UID=$(id -u); NAPCAT_GID=$(id -g); docker-compose up -d` 运行到后台
</details>
# 固化路径,方便下次直接快速登录