# Environment for imprion-pos-agent. Shipped by the package and always
# overwritten on upgrade — it is not a conffile (Doc 3 §9).
ENVIRONMENT=prod
SERVER_ADDR=fleet.imprion.si:9000
HTTP_PORT=:8080
HEARTBEAT_SECONDS=60
# How often an unclaimed terminal asks whether a technician has claimed it. The
# server sends its own cadence in the join-code answer and that one wins; this
# is only what is used before the server has ever answered.
CLAIM_POLL_SECONDS=5
# Doc 2 §3.4 step 2: apt update + full-upgrade, once, before the join code and
# only while no enrolment marker exists (G6). It is on in production — a
# terminal out of a box has months of updates to catch up on before it sells
# anything — and the lab turns it off in the .local override, because against a
# real mirror it is minutes on every reset. Either way the agent logs which way
# it went, so a skipped upgrade is never silent.
PRE_ENROLL_UPGRADE=true
# There is deliberately no SERVER_INSECURE here. The control channel is TLS
# unless something sets it to true explicitly, and the day X1's sign-off lands
# no terminal should be sitting in plaintext because a default said so.

# --- backing the PoS data up ------------------------------------------------
# The folder a backup copies. Imprion keeps its data in BoltDB — one mmapped
# file, rewritten in place — so there is nothing to dump: the folder is the
# backup. It is `data/` inside the PoS install directory because that is where
# the Imprion PoS writes (owner, 2026-09-22); it was /var/lib/imprion-pos while
# the lab ran a stand-in artefact that wrote nowhere. Nothing in Doc 2 or Doc 3
# names this path, which is why it is configurable rather than a constant.
POS_DATA_DIR=/opt/imprion/pos/data
# Where the archives land. Inside the agent state directory on purpose, so the
# decommission wipe of Doc 1 §6.6 takes them with everything else — a
# decommissioned till must not leave a restaurant's trading data on a disk
# somebody carries out of the building. The last three are kept.
BACKUP_DIR=/var/lib/imprion-agent/backups
# The size the *source* has to stay under. Over it the backup is refused, never
# truncated: half a BoltDB file is not a backup. A till's data is measured in
# tens of megabytes, so this is the guard against a data directory with
# something in it nobody meant to put there.
BACKUP_MAX_MB=2048
