Database moves into a data directory · repo no longer ships a database
Changed
- The database now lives in a dedicated data directory. Point configuration at a directory (
DATA_DIR, default/app/data) instead of a.dbfile — statainer manages theusers.dbfilename internally and creates it there on first start. The image pre-creates/app/dataand setsDATA_DIR=/app/data; the bundled compose already mounts./data:/app/data. USERS_DB_PATH(file or directory) is still honored for backward compatibility and takes precedence overDATA_DIR.
Migration (existing users)
- On startup, a database at the old
/app/users.dblocation is moved into the data directory automatically, so upgrading users keep their accounts and settings. The move is best-effort, idempotent and never blocks startup. - Deployments already using the bundled compose (
./data:/app/data) require no action — their database is already in the data directory.
Security
- Removed the committed
users.db(and a straytemplates/users.db) from the repository. They contained a real admin password hash and were tracked in a public repo. They are now untracked and ignored; the database is only ever created at runtime. (Docker images were never affected —.dockerignorealready excluded these files.) - Note: the old hash still exists in prior git history. Rotating the admin password is recommended if it was ever a real credential.
Tests
- Full suite: 100 passed (+5 new tests covering data-dir resolution and the legacy database migration).
Docker images
drakonis96/statainer:v0.9.20/:latestdrakonis96/dockerstats:v0.9.20/:latest
Multi-arch: linux/amd64, linux/arm64.