|
|
✅ 镜像基础信息
- 镜像地址:ghcr.io/ulsklyc/yuvomi:latest
- 容器内端口:3000
- 数据库:SQLite 文件数据库,单文件,无需 MySQL/Postgres
- 技术栈:Node.js + Vue 前端
- 架构:amd64,arm64 一般也支持
- 启动依赖:必须配套 .env 文件,很多密钥、管理员配置都在 .env 里,没有 .env 直接启动会报错
✅ 核心功能
- 收支记账:收入、支出、转账、预算,支持定期重复账单(房租、月供)
- 多账户:银行卡、现金、零钱、理财账户,账户之间转账
- 分类 + 标签:收支分类(餐饮、交通、医疗等)+ 自定义标签,方便筛选统计
- 报表图表:月度 / 年度汇总、收支趋势、分类占比饼图,预算执行对比
- 多用户:支持家庭成员共用一套账本,权限隔离
- 附件单据:上传小票、发票照片(就是配置里的 documents 存储)
- 模块扩展:./modules 目录用来加载自定义扩展模块
- 自动备份:内置备份功能,备份文件输出到 /backups 挂载目录
- PWA:手机浏览器添加到桌面,手机记账很方便
📂 挂载目录说明(对应你 compose)
- ${DATA_DIR:-./data}:/data:核心目录,存放 sqlite 数据库 yuvomi.db + 程序运行缓存,备份重点备份这个文件夹
- ${BACKUP_DIR:-./backups}:/backups:自动备份文件存放目录
- ${MODULES_DIR:-./modules}:/app/modules:扩展模块挂载,放自定义插件
- ${DOCUMENT_STORAGE_LOCAL_DIR:-./documents}
{DOCUMENT_STORAGE_LOCAL_PATH:-/documents}:发票小票等上传附件存储;DOCUMENT_STORAGE_LOCAL_ENABLED=false 默认关闭本地文档存储,需要手动改成 true 才生效
docker-compose文件内容:
- services:
- yuvomi:
- image: ghcr.io/ulsklyc/yuvomi:latest
- build: . # optional: use --build to build locally instead
- container_name: yuvomi
- restart: unless-stopped
- ports:
- # Host-Port aus .env (OIKOS_HTTP_PORT); App im Container bleibt auf 3000.
- - "0.0.0.0:${OIKOS_HTTP_PORT:-3000}:3000"
- volumes:
- - ${DATA_DIR:-./data}:/data
- - ${BACKUP_DIR:-./backups}:/backups
- # Drop Yuvomi modules into ./modules, or set MODULES_DIR=/path/to/modules in
- # .env. The app reads that name inside the container too, so environment:
- # below pins it to /app/modules; the .env value only moves the mount source.
- - ${MODULES_DIR:-./modules}:/app/modules
- # Optional local documents folder. BOTH ends come from the .env: the app
- # writes to DOCUMENT_STORAGE_LOCAL_PATH, so mounting at a fixed /documents
- # would send uploads into the container layer as soon as anyone changes
- # that path - and they would be gone on the next pull && up -d.
- - ${DOCUMENT_STORAGE_LOCAL_DIR:-./documents}:${DOCUMENT_STORAGE_LOCAL_PATH:-/documents}
- # Bewusst die Kurzform, nicht `path:`/`required:` (Issue #765): die Langform
- # gibt es erst ab Compose v2.24, und Synology DSM, QNAP und ältere Distros
- # liefern älter - dort scheitert schon das Einlesen mit
- # "services.yuvomi.env_file.0 must be a string", also noch vor dem ersten
- # Start. Die Langform stand hier für Git-/GitOps-Stacks ohne .env (#698);
- # dieser Weg geht seitdem über docs/docker-compose.portainer.yml, das jede
- # Variable einzeln aufführt. Seit die Secrets beim ersten Start entstehen,
- # liefe ein Stack ohne .env mit der Langform zwar an; die Kurzform bleibt
- # trotzdem, weil sie auf jeder Compose-Version liest, und ohne .env bricht
- # sie mit "env file not found" ab, bevor etwas startet.
- env_file:
- - .env
- environment:
- - NODE_ENV=production
- - DB_PATH=${DB_PATH:-/data/yuvomi.db}
- - BACKUP_DIR=/backups
- - MODULES_DIR=/app/modules
- # Local document storage (optional): set to true to store uploaded documents on the mounted /documents folder.
- - DOCUMENT_STORAGE_LOCAL_ENABLED=${DOCUMENT_STORAGE_LOCAL_ENABLED:-false}
- - DOCUMENT_STORAGE_LOCAL_PATH=${DOCUMENT_STORAGE_LOCAL_PATH:-/documents}
- # Secure cookies come from .env (the installer sets them):
- # - Reverse proxy + HTTPS → SESSION_SECURE=true, TRUST_PROXY=1
- # - Direct HTTP access → SESSION_SECURE=false, TRUST_PROXY=loopback
- # Default when unset (e.g. a .env that does not carry the line): false,
- # so direct HTTP login keeps working out of the box.
- - SESSION_SECURE=${SESSION_SECURE:-false}
- healthcheck:
- test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', r => process.exit(r.statusCode === 200 ? 0 : 1))"]
- interval: 30s
- timeout: 10s
- retries: 3
- start_period: 10s
复制代码
.env:
- # Yuvomi - Environment Variables
- # Copy this file to .env and adjust the values.
- # Server
- PORT=3000
- NODE_ENV=production
- # LOG_LEVEL=info # debug, info, warn, error (default: info)
- # The app's own files (scripts, styles, language files) are compressed once with a
- # high Brotli level and then served from memory - about 5 MB of RAM and, spread over
- # the first requests after a start, some 25 s of CPU on one core in the background.
- # Set to off to compress per request at a low level instead, as it was before.
- # STATIC_BROTLI=off
- # Address the app listens on (default: all interfaces). Leave unset in a container:
- # the published port reaches the app only when it listens on all interfaces. Set to
- # 127.0.0.1 when Node runs directly on the host behind a reverse proxy on that host.
- # IP addresses only: a host name (localhost included) is refused, and so is an IPv6
- # address with a zone ID (fe80::1%eth0).
- # Not the same as OIKOS_HTTP_BIND below, which is where the container engine
- # publishes the port.
- # BIND_ADDRESS=127.0.0.1
- # Container host port mapping (compose maps OIKOS_HTTP_PORT:3000).
- # The app inside the container always listens on 3000; change only the host port here.
- OIKOS_HTTP_PORT=3000
- # Host bind address for the published port (podman-compose.yml only; default 0.0.0.0).
- # Set to 127.0.0.1 for rootless Podman behind a reverse proxy on the same host.
- # OIKOS_HTTP_BIND=0.0.0.0
- # TZ=Europe/Berlin # Container timezone (default: UTC). Affects log timestamps
- # # and the automated-backup schedule, and is the DEFAULT for
- # # the household zone. Since v2.34.0 the household zone is a
- # # setting of its own (Settings > Account > Appearance >
- # # Region), and that setting wins where both are present -
- # # TZ lives in the compose file, which you cannot reach on
- # # Umbrel, TrueNAS or Unraid. Whichever applies is the zone
- # # used wherever a time has no zone of its own: the calendar
- # # day server jobs call "today", events pushed to Google or
- # # Outlook, the due times of CalDAV reminders synced into
- # # Tasks, and the times in the exported calendar feed -
- # # subscribers read those in this zone, so a wrong zone
- # # shifts every appointment.
- # Container storage paths (bind mounts)
- # DATA_DIR=./data # Host folder for the database and stored app data
- # BACKUP_DIR=./backups # Host folder for scheduled backups
- # MODULES_DIR=./modules # Host folder for third-party drop-in modules (see MODULES.md)
- # These are HOST paths, used by docker-compose.yml / podman-compose.yml to build the
- # volume mapping. Inside the container the app always uses /data, /backups and
- # /app/modules (the compose files and the Quadlet set DB_PATH, BACKUP_DIR and
- # MODULES_DIR accordingly), so a host path here only moves the mount source. Do not
- # pass this file to a bare `docker run --env-file`: nothing pins those names there,
- # and BACKUP_DIR=./backups would point the app at /app/backups, which is outside the
- # mounted volume and not writable.
- # On SELinux systems (RHEL/Fedora/CentOS Stream) use podman-compose.yml — it adds
- # the :Z relabel automatically so the container can access these folders.
- # Installing modules from Settings (Settings → Modules → Add custom module).
- # Off by default. What it opens: an admin in a browser session can put
- # same-origin script into modules/ from the web interface (ZIP upload or GitHub
- # URL), with no shell or file access to the server. A module installed that way
- # stays off until an admin approves it in a browser session, and the web
- # interface deletes only what it installed. Set true only if you mount modules/
- # and want that; otherwise copy module folders into modules/ by hand as before.
- # MODULES_ALLOW_WEB_INSTALL=false
- # Secrets from files (Docker/Podman secrets, Vault Agent): instead of putting a value
- # here, point <NAME>_FILE at a file that holds it, e.g.
- # SESSION_SECRET_FILE=/run/secrets/session_secret
- # DB_ENCRYPTION_KEY_FILE=/run/secrets/db_encryption_key
- # Works for SESSION_SECRET, DB_ENCRYPTION_KEY and the other secrets in this file
- # (client secrets, passwords, API keys). Set either <NAME> or <NAME>_FILE, not both;
- # a missing or empty file stops the start. Line breaks at the end of the file are ignored.
- # The app reads the file as uid 1000 (568 on TrueNAS), not as root: give the file
- # that owner and mode 600 (see "Secrets from Files" in docs/installation.md).
- # Session
- # The placeholder below is not a secret: it is printed in this repository, so
- # anyone who can reach your instance could forge a session cookie and sign in as
- # any user. The app refuses to start until you replace it. Generate a value with
- # `openssl rand -base64 48`, or delete the line: with SESSION_SECRET unset, Yuvomi
- # generates one on the first start and keeps it in .secrets/SESSION_SECRET next to
- # the database. Changing it later only signs everyone out once.
- SESSION_SECRET='SESSION_SECRET'
复制代码
|
|