Git Product home page Git Product logo

Comments (7)

quewen08 avatar quewen08 commented on May 24, 2024 1

通过docker-compose 创建容器,然后在网页上创建账本,能看到日志是输出了create file success,但是在物理机上映射的目录中找不到该文件,只有在docker容器内部才能找到

from beancount-gs.

ianzhuo avatar ianzhuo commented on May 24, 2024 1

@BaoXuebin
作者您好,有關這個帳本存儲位置應寫入/data/beancount配置,是不是考慮寫在說明文檔中呢?我在配置docker時也遇到這個問題,還要來這邊翻issue才找到解答,對初用beancount-gs的用戶來說,有點小障礙,謝謝。

from beancount-gs.

BaoXuebin avatar BaoXuebin commented on May 24, 2024

https://github.com/BaoXuebin/beancount-gs/blob/main/docker-compose.yml
如果不设置参数,账本文件会创建到物理机器的 /data/beancount 文件夹。

from beancount-gs.

quewen08 avatar quewen08 commented on May 24, 2024
version: "3.9"
services:
  app:
    container_name: beancount-gs
    image: xdbin/beancount-gs:latest
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Asia/Shanghai
    ports:
      - 10000:80
    # volumes 挂载目录会导 /app/public/icons 中的图标被覆盖,这里将默认图标在挂载后重新拷贝图标    
    command: >
     sh -c "cp -rn /app/public/default_icons/* /app/public/icons && ./beancount-gs -p 80"
    volumes:
      - "${dataPath:-/srv/dev-disk-by-uuid-{删掉的hash}/self/data/beancount}:${dataPath:-/data/beancount}"
      - "${dataPath:-/srv/dev-disk-by-uuid-{删掉的hash}/self/data/beancount/public}/icons:/app/public/icons"
      - "${dataPath:-/srv/dev-disk-by-uuid-{删掉的hash}/self/data/beancount}/config:/app/config"
      - "${dataPath:-/srv/dev-disk-by-uuid-{删掉的hash}/self/data/beancount}/bak:/app/bak"
    restart: unless-stopped

就这么写的啊

from beancount-gs.

BaoXuebin avatar BaoXuebin commented on May 24, 2024

按照这个写法,你在 docker 中的 /data/beancount 会映射到宿主机的 /srv/dev-disk-by-uuid/self/data/beancount 这个目录。其他目录则只会存在 docker 中,而不会映射到宿主机。

1657818597319

上图中,账本存储位置 定义了数据存储位置,必须设置为 /data/beancount,如果设置了其他路径,会导致无法出现在物理机器上。

你可以进入 docker,删除 /config/config.json,然后 docker-compose up 启动 docker 镜像重新配置 账本存储位置

from beancount-gs.

quewen08 avatar quewen08 commented on May 24, 2024

原来如此,明白了。感谢

from beancount-gs.

BaoXuebin avatar BaoXuebin commented on May 24, 2024

不错的建议

from beancount-gs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.