Files
GTI_GERENCIADOR_FISCAL/deploy/hub/.env.example
T
gtiandClaude Sonnet 5 9f08998800 feat: deterministic cClassTrib resolver + gated CCLASSTRIB auto-apply (default OFF), RTC panel summary; 1.1.9
- resolver (rules RTC-R0..R4/A1..A3/G1..G2) over the official cClassTrib table 2026-06-22 and LC 214/2025 annexes; local vs official catalog comparison
- ONE root-cause RTC blocker per product (missing/unresolved/ambiguous/conflict/official mismatch/catalog outdated/evidence missing)
- auto-apply: C000025.CCLASSTRIB only, three switches (FIREBIRD_WRITES + RTC_AUTO_APPLY_ENABLED + Hub authorization), per-product re-read and re-decision, never overwrites, rowcount 1, audit table rtc_write_audits (migration 0027)
- copy-only write E2E (280/280 applied, only CCLASSTRIB changed, 2nd run 0 writes, stale decision 0 writes); real databases untouched
- docs: cclasstrib_resolution, rtc_auto_apply, unified_fiscal_completeness

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-24 21:18:34 -03:00

46 lines
2.1 KiB
Bash

# GTI Fiscal Hub — production environment (copy to .env, never commit .env)
GTI_FISCAL_VERSION=1.1.9
# REQUIRED. URL-safe secret (used inside a connection URL): openssl rand -hex 24
POSTGRES_PASSWORD=
# REQUIRED. Public HTTPS URL that Agents use (TLS terminates in the reverse proxy in front of the Hub).
BASE_URL=https://fiscal.example.gti
# Interface the Hub listens on. Keep 127.0.0.1 when a reverse proxy runs on the same host; use the LAN IP only behind a firewall.
# Docker-published ports bypass UFW: restrict the source in the DOCKER-USER chain (see docs/PILOT_DEPLOYMENT.md).
HUB_BIND=127.0.0.1
HUB_PORT=8000
# IP(s) of the reverse proxy allowed to set X-Forwarded-For/-Proto (comma-separated). 127.0.0.1 = same host.
FORWARDED_ALLOW_IPS=127.0.0.1
# 1 once HTTPS terminates in front of the Hub (session/CSRF cookies become Secure).
WEB_COOKIE_SECURE=0
# SSO from GTI Gerenciador (docs/PILOT_DEPLOYMENT.md, "Human access"). Needs HTTPS (WEB_COOKIE_SECURE=1).
# PUBLIC key only (raw Ed25519, base64url) — the private key lives only in the panel.
SSO_GERENCIADOR_CHAVE_PUBLICA=
SSO_START_URL=https://gtigerenciador.example.gti/sso/fiscal
# Collaborator session lifetime; afterwards they are signed in again transparently.
FEDERATED_SESSION_SECONDS=3600
LOG_LEVEL=INFO
AGENT_ONLINE_THRESHOLD_SECONDS=120
# Agent distribution (docs/PILOT_DEPLOYMENT.md, "Agent distribution"). Defaults
# are safe; override only if the pilot needs a longer/shorter window.
# AGENT_DOWNLOAD_LINK_TTL_SECONDS=1800
# AGENT_DOWNLOAD_MAX_USES_DEFAULT=1
# AGENT_ENROLLMENT_TTL_SECONDS=86400
# Client mirror from GTI Gerenciador (docs/PILOT_DEPLOYMENT.md, "Client integration").
# GTI Gerenciador is the single source of truth for clients — the Fiscal Hub never
# gets MySQL credentials. Both empty = sync disabled (no client selector data).
GERENCIADOR_INTERNAL_URL=https://gtigerenciador.example.gti/internal/fiscal/clients
# Dedicated bearer token, shared only with the panel's FISCAL_INTERNAL_API_TOKEN —
# never SESSION_SECRET, the SSO key, an admin password or an Agent token.
FISCAL_INTERNAL_API_TOKEN=
# Directory (host) where pg_dump backups are written by backup.sh
BACKUP_DIR=./backups