e81a4386d2
- Schema: account_id FK on checks and layout_fields; UNIQUE per-account on check_no and field_name - DB: runtime migration recreates both tables to add account_id (assigns existing rows to account 1) - Routes: GET /api/accounts lists all; GET /api/account/:id replaces hardcoded id=1; POST /api/account/setup always creates a new account and returns accountId - checks.js: all queries scoped by account_id; POST requires account_id in body - pdf.js: resolves account from check's account_id instead of id=1; layout fields fetched per-account - import-mdb.js: always INSERTs a new account (never deletes existing); all records tagged with new accountId - Frontend: account switcher in header; activeAccountId persisted to localStorage; all API calls pass account_id; switching accounts reloads checks; wizard and import auto-switch to newly created account
18 lines
401 B
YAML
18 lines
401 B
YAML
services:
|
|
check-printing:
|
|
image: dogiakos/check-printing:latest
|
|
container_name: check-printing
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3003:3000"
|
|
volumes:
|
|
# Persistent data: SQLite DB lives here
|
|
- check-printing-data:/app/data
|
|
environment:
|
|
- NODE_ENV=production
|
|
- PORT=3000
|
|
- DB_PATH=/app/data/check-printing.db
|
|
|
|
volumes:
|
|
check-printing-data:
|