Containerize for Pi: env-var config, compose stack, CI workflow
Some checks failed
build-and-deploy / build (push) Failing after 18s
Some checks failed
build-and-deploy / build (push) Failing after 18s
- Add app/config.py (12-factor, env-driven: DB/NATS/MinIO, URL-encoded pw) - Route database/ingestor/sources/alembic through config; kill hardcoded svc.cluster.local hostnames - Drop unused redis dependency - Add docker-compose.yml (timescaledb-postgis pg13 arm64 + optional nats) - Add .env.example, .dockerignore, .forgejo/workflows/build.yml (arm64 build+SSH deploy)
This commit is contained in:
parent
93b8b89639
commit
3d53ed2c1c
11 changed files with 175 additions and 17 deletions
|
|
@ -11,17 +11,15 @@ from nats.errors import TimeoutError
|
|||
|
||||
from database import async_session
|
||||
from models import events as events_table
|
||||
from config import NATS_URL
|
||||
|
||||
logger = logging.getLogger("osint.ingestor")
|
||||
|
||||
# NATS connection settings
|
||||
NATS_URLS = "nats://osint-nats.customer1.svc.cluster.local:4222"
|
||||
NATS_URLS = NATS_URL
|
||||
NATS_STREAM = "events"
|
||||
NATS_DURABLE = "osint-ingestor"
|
||||
|
||||
# Redis cache settings
|
||||
REDIS_URL = "redis://osint-redis-sentinel.customer1.svc.cluster.local:26379/0"
|
||||
|
||||
|
||||
async def ingest_event(msg: dict):
|
||||
"""Ingest a single event from NATS into PostgreSQL."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue