mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-12-06 20:38:50 +00:00
fixing paisa volumes
This commit is contained in:
+15
-21
@@ -15,13 +15,13 @@ budgets, and transaction management.
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Copy this stack's `config/` folder to `${PAISA_LEDGER_PATH:-/data/paisa}`
|
||||
1. Copy this stack's `config/` folder to `${VOL_PATH:-/data/paisa}`
|
||||
and make it a git repo. It holds `paisa.yaml`, an empty `main.ledger`,
|
||||
`sheets/`, and a `.gitignore`. Edit `paisa.yaml` to suit you.
|
||||
Starting a new business? Copy `template/` instead: it has a chart of
|
||||
accounts for a small BC corporation and commented example entries.
|
||||
Fill in its `TODO`s.
|
||||
2. Deploy the stack. Paisa creates `paisa.db` in `${VOL_PATH:-/data}/paisa`.
|
||||
2. Deploy the stack. Paisa creates `paisa.db` in the same folder.
|
||||
3. Open http://localhost:7500 in your browser.
|
||||
|
||||
To explore first, see [docs/demo.md](docs/demo.md) for the sample books of
|
||||
@@ -34,25 +34,20 @@ especially the section on closing entries.
|
||||
|
||||
PAISA_IMAGE – container image (default ananthakumaran/paisa:latest)
|
||||
PAISA_RESTART – restart policy (default unless-stopped)
|
||||
VOL_PATH – host base path for the database, backed up by restic (default /data)
|
||||
PAISA_LEDGER_PATH – full host path of the ledger git repo, not a base path (default /data/paisa)
|
||||
VOL_PATH – full host path of the ledger git repo; nothing is appended (default /data/paisa)
|
||||
PAISA_PORT – host port for the web UI (default 7500)
|
||||
|
||||
## Volume Notes
|
||||
|
||||
Anything that belongs in git goes in `PAISA_LEDGER_PATH`; anything that
|
||||
doesn't (the SQLite database) goes in `VOL_PATH`, which is backed up.
|
||||
One volume holds everything:
|
||||
|
||||
- `/root/Documents/paisa` — `paisa.yaml`, `*.ledger`, `sheets/`;
|
||||
`${PAISA_LEDGER_PATH:-/data/paisa}` on the host, kept in git
|
||||
- `/var/lib/paisa` — `paisa.db`; `${VOL_PATH:-/data}/paisa` on the
|
||||
host, backed up by restic
|
||||
- `/root/Documents/paisa` — `paisa.yaml`, `*.ledger`, `sheets/`, and
|
||||
`paisa.db`; `${VOL_PATH:-/data/paisa}` on the host
|
||||
|
||||
Both default to `/data/paisa`, so they start out as the same folder.
|
||||
`PAISA_LEDGER_PATH` is a full path (nothing is appended), so it can point
|
||||
anywhere, such as the `demo/` folder in a clone of this repo. The
|
||||
database location comes from `db_path` in `paisa.yaml`
|
||||
(`/var/lib/paisa/paisa.db`), so it never lands in the ledger repo.
|
||||
`VOL_PATH` is the full path to the folder (nothing is appended), so it
|
||||
can point anywhere, such as the `demo/` folder in a clone of this repo.
|
||||
Keep the folder in git; the shipped `.gitignore` keeps `paisa.db` out of
|
||||
commits. The database is a cache rebuilt from the ledger files.
|
||||
|
||||
## Network Notes
|
||||
|
||||
@@ -65,7 +60,6 @@ docker run -d \
|
||||
--name=paisa \
|
||||
-p 7500:7500 \
|
||||
-v /data/paisa:/root/Documents/paisa \
|
||||
-v /data/paisa:/var/lib/paisa \
|
||||
ananthakumaran/paisa:latest
|
||||
```
|
||||
|
||||
@@ -73,11 +67,11 @@ docker run -d \
|
||||
|
||||
- If Paisa finds no `paisa.yaml`, it creates one with Indian defaults
|
||||
(INR, en-IN, fiscal year starting in April), so copy `config/` in first.
|
||||
- `db_path: /var/lib/paisa/paisa.db` in `paisa.yaml` is what keeps the
|
||||
database out of git. Keep it if you write your own config.
|
||||
- With the default `/data` for both, `paisa.db` sits in the git folder;
|
||||
the shipped `.gitignore` keeps it out of commits. Existing single-folder
|
||||
installs keep working, since `/var/lib/paisa/paisa.db` is the same file.
|
||||
- `paisa.db` sits in the git folder (`db_path: paisa.db`); keep the
|
||||
shipped `.gitignore` so it isn't committed.
|
||||
- Upgrading from the old two-volume layout with the old default
|
||||
(`VOL_PATH=/data`): set `VOL_PATH=/data/paisa` or Paisa will look in
|
||||
`/data`.
|
||||
- `config/paisa.yaml` uses CAD, en-US number formatting,
|
||||
America/Vancouver, a January fiscal year, and no login. Add
|
||||
`user_accounts` before exposing Paisa through the proxy.
|
||||
|
||||
Reference in New Issue
Block a user