# TRM platform — deployment stack # # Deployed via Portainer Repository Stack: # Repository: git.dev.microservices.al/trm/deploy # Compose path: compose.yaml # Branch: main # # Images are built and pushed by each service's own Gitea workflow. # This file references them by tag and runs them as a coordinated stack. # # Before first deploy on the host: `docker login git.dev.microservices.al` # (Portainer can store registry credentials in its UI; configure once.) # # Environment variables are populated from Portainer's stack environment # config (or a `.env` file alongside this compose for non-Portainer hosts). # Defaults are provided via `${VAR:-default}` so the stack starts with no # explicit configuration on a fresh deploy. name: trm services: # ------------------------------------------------------------------- # Redis — telemetry queue + (future) connection registry for Phase 2. # Internal-only; no host port mapping. # ------------------------------------------------------------------- redis: image: redis:7-alpine expose: - '6379' volumes: - redis-data:/data restart: unless-stopped healthcheck: test: ['CMD', 'redis-cli', 'ping'] interval: 10s timeout: 3s retries: 5 # ------------------------------------------------------------------- # tcp-ingestion — Teltonika telemetry TCP server. # Built by git.dev.microservices.al/trm/tcp-ingestion's Gitea workflow. # ------------------------------------------------------------------- tcp-ingestion: image: git.dev.microservices.al/trm/tcp-ingestion:${TCP_INGESTION_TAG:-main} depends_on: redis: condition: service_healthy ports: # Devices connect to this port. Use `${HOST_BIND_IP:-0.0.0.0}:5027:5027` # if you want to restrict which host interface accepts connections. - '${TCP_INGESTION_PORT:-5027}:5027' environment: NODE_ENV: production INSTANCE_ID: ${TCP_INGESTION_INSTANCE_ID:-stage-1} REDIS_URL: redis://redis:6379 LOG_LEVEL: ${LOG_LEVEL:-info} restart: unless-stopped # ------------------------------------------------------------------- # Future services land here: # - processor: consumes telemetry from Redis, writes to DB # - postgres: PostgreSQL with TimescaleDB extension # - directus: business-plane API + admin UI # - react-spa: front-end (static, served via nginx or Caddy) # See ../docs/wiki/ for the platform architecture. # ------------------------------------------------------------------- volumes: redis-data: