services: redis: image: redis:8 ports: - "6379:6379" volumes: - redis-data:/data restart: unless-stopped mosquitto: image: eclipse-mosquitto:2.0 ports: - "1883:1883" - "9001:9001" - "8883:8883" volumes: - ./mosquitto/:/mosquitto/:Z restart: unless-stopped timescaledb: image: timescale/timescaledb:latest-pg17 environment: POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-example} POSTGRES_DB: ${POSTGRES_DB:-iot_data} ports: - "5432:5432" volumes: - timescaledb-data:/var/lib/postgresql/data restart: unless-stopped healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"] interval: 10s timeout: 5s retries: 5 device-manager: image: git.ferdzo.xyz/ferdzo/lyncis/device-manager:latest ports: - "8000:8000" environment: - DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-example}@timescaledb:5432/${POSTGRES_DB:-iot_data} - CA_CERT_PATH=/app/certs/ca.crt - CA_KEY_PATH=/app/certs/ca.key - CRL_PATH=/app/certs/ca.crl volumes: - ./mosquitto/certs:/app/certs:z depends_on: timescaledb: condition: service_healthy restart: unless-stopped mqtt-ingestion: image: git.ferdzo.xyz/ferdzo/lyncis/mqtt-ingestion:latest environment: - REDIS_HOST=redis - REDIS_PORT=6379 - REDIS_DB=0 - MQTT_BROKER=mosquitto - MQTT_PORT=1883 - MQTT_USER=${MQTT_USER:-} - MQTT_PASS=${MQTT_PASS:-} depends_on: - mosquitto - redis restart: unless-stopped db-write: image: git.ferdzo.xyz/ferdzo/lyncis/db-write:latest environment: - REDIS_HOST=redis - REDIS_PORT=6379 - REDIS_DB=0 - DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-example}@timescaledb:5432/${POSTGRES_DB:-iot_data} - CONSUMER_GROUP_NAME=db_writer - CONSUMER_NAME=worker-01 - BATCH_SIZE=100 - BATCH_TIMEOUT_SEC=5 - STREAM_PATTERN=mqtt_stream:* depends_on: timescaledb: condition: service_healthy redis: condition: service_started mqtt-ingestion: condition: service_started restart: unless-stopped backend: image: git.ferdzo.xyz/ferdzo/lyncis/backend:latest ports: - "3000:3000" environment: - POSTGRES_HOST=timescaledb - POSTGRES_PORT=5432 - POSTGRES_USER=${POSTGRES_USER:-postgres} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-example} - POSTGRES_DB=${POSTGRES_DB:-iot_data} - DEVICE_MANAGER_URL=http://device-manager:8000 - SECRET_KEY=${SECRET_KEY:-change-me-in-production} - DEBUG=False - ALLOWED_HOSTS=* depends_on: timescaledb: condition: service_healthy device-manager: condition: service_started restart: unless-stopped frontend: image: git.ferdzo.xyz/ferdzo/lyncis/frontend:latest ports: - "80:80" depends_on: - backend restart: unless-stopped gpt-service: image: git.ferdzo.xyz/ferdzo/lyncis-gpt-service:latest environment: - OPENAI_API_KEY=${OPENAI_API_KEY} ports: - "8001:8001" restart: unless-stopped volumes: redis-data: timescaledb-data: