doc: README.md
This commit is contained in:
parent
20afafd138
commit
878b17f049
19
README.md
19
README.md
|
|
@ -54,21 +54,36 @@ xdbin/beancount-gs:latest
|
||||||
|
|
||||||
**docker-compose**
|
**docker-compose**
|
||||||
|
|
||||||
|
在指定目录创建文件 `docker-compose.yml`,然后复制下面内容到这个文件,执行 `docker-compose up -d`
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: "3.9"
|
version: "3.9"
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
container_name: beancount-gs
|
container_name: beancount-gs
|
||||||
image: xdbin/beancount-gs:latest
|
image: xdbin/beancount-gs:${tag:-latest}
|
||||||
ports:
|
ports:
|
||||||
- "10000:80"
|
- "10000:80"
|
||||||
|
# volumes 挂载目录会导 /app/public/icons 中的图标被覆盖,这里将默认图标在挂载后重新拷贝图标
|
||||||
|
command: >
|
||||||
|
sh -c "cp -rn /app/public/default_icons/* /app/public/icons && ./beancount-gs -p 80"
|
||||||
volumes:
|
volumes:
|
||||||
- "${dataPath:-/data/beancount}:${dataPath:-/data/beancount}"
|
- "${dataPath:-/data/beancount}:/data/beancount"
|
||||||
- "${dataPath:-/data/beancount}/icons:/app/public/icons"
|
- "${dataPath:-/data/beancount}/icons:/app/public/icons"
|
||||||
- "${dataPath:-/data/beancount}/config:/app/config"
|
- "${dataPath:-/data/beancount}/config:/app/config"
|
||||||
- "${dataPath:-/data/beancount}/bak:/app/bak"
|
- "${dataPath:-/data/beancount}/bak:/app/bak"
|
||||||
|
- "${dataPath:-/data/beancount}/logs:/app/logs"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
默认的文件存储路径为 `/data/beancount`,如果你想更换其他路径,可以在当前目录下新建 `var.env`,然后将下面内容复制到这个文件
|
||||||
|
|
||||||
|
```properties
|
||||||
|
tag=latest
|
||||||
|
dataPath=自定义的目录
|
||||||
|
```
|
||||||
|
|
||||||
|
执行 `docker-compose --env-file ./var.env up -d` 即可
|
||||||
|
|
||||||
## 项目负责人
|
## 项目负责人
|
||||||
|
|
||||||
[@BaoXuebin](https://github.com/BaoXuebin)
|
[@BaoXuebin](https://github.com/BaoXuebin)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue