Commit Graph
6 Commits
Author SHA1 Message Date
aramesh-site deploy 1b491357ab feat(blog): جدول — ستون‌ها قابل تغییر اندازه/افزودن و حذف؛ لینک کپشن تصویر؛ هدینگ‌های نسخه انگلیسی بزرگ‌تر 2026-10-06 10:57:01 +00:00
aramesh-site deploy 275c3d6bb3 fix(chatbot): row_factory=dict_row در sync_chunks و fetch_all_chunks
بدون آن، psycopg3 تاپل برمی‌گرداند و row["model"] خطای
«tuple indices must be integers or slices, not str» می‌داد؛ نتیجه:
«Initial index sync failed» و unavailable ماندن چت با وجود امبد موفق.
2026-09-27 10:32:48 +00:00
aramesh-site deploy ef619c635e fix(chatbot): کوتیشن desc در سه کوئری دیگر ایندکس
همان باگ قبلی در investment_models/process_steps/why_us/timeline هم بود؛
بدون این، سینک ایندکس ناقص می‌ماند و بخشی از محتوا هرگز بردار نمی‌گرفت.
2026-09-27 10:31:12 +00:00
aramesh-site deploy d55c8cc1e5 fix(chatbot): کوئری خدمات و نصب torch نسخهٔ CPU
- content.py: ستون desc در SQL بدون کوتیشن بود و PostgreSQL آن را کلمهٔ کلیدی
  می‌گیرد؛ نتیجه: «Initial index sync failed: syntax error at or near "desc"»
  در استارت و غیرقابل استفاده ماندن چت تا reindex. حالا "desc" کوتیشن شده.
- Dockerfile: با این‌که سرور GPU ندارد، pip نسخهٔ CUDA تورچ را از PyPI می‌گرفت
  (ایمیج ۹.۷GB با کتابخانه‌های nvidia). اول torch از ایندکس CPU نصب می‌شود.
2026-09-26 22:04:29 +00:00
MMD 74770cd99d fix(stack): bring-up fixes from first local deployment
- traefik pin v3.3 -> v3.6: v3.3's old docker client fails against
  Engine 29 socket proxy (empty daemon errors, no routers)
- backend/minio/chatbot/umami: traefik.docker.network hint — Traefik
  picked the internal-network IP for multi-network services and replies
  were hairpin-dropped (all backend routes hung)
- db-init: psql needs an explicit -d arameshplaza (no default db 'aramesh'),
  set -e so failures actually fail; one-shot folded-YAML needs semicolons
- chatbot image: drop g++ (apt unreachable in build network; all wheels
  prebuilt) and mkdir /data before chown (VOLUME does not create it)
- frontend image: create caddy user (alpine image has none) with writable
  /config and /data
- monitoring: blackbox probes replace raw metric scrapes of JSON/HTML
  health endpoints (they reported 'down' while healthy); blackbox joins
  edge; SITE_URL passed via env (Prometheus has no ${VAR:-default}
  expansion); ContainerMemoryNearLimit PromQL fixed (comparison inside
  label braces); HostDiskAlmostFull filters WSL/Docker-Desktop
  pseudo-mounts
- alertmanager: config rendered by stack.sh (no env expansion in AM) and
  delivered to Bale (tapi.bale.ai); stack.sh monitoring command
- machine-local override: minio console/API moved to 29001/29000
2026-09-19 01:22:02 +03:30
MMD ce0735d775 feat(stack): full overhaul — hardening, ops tooling, monitoring, analytics, chatbot
Security: deep /api/health (DB+MinIO probes, 503 on failure) + /api/live;
rate-limited public forms with honeypots; real client IP behind Traefik
(--proxy-headers); TipTap URL sanitization on write (nh3); non-root
containers + slim .dockerignore; prod MinIO console bound to 127.0.0.1;
HSTS/nosniff on TLS routers; JWT 8h; no default credentials in code.

Reliability: Alembic migrations (create_all baseline); graceful shutdown
(exec uvicorn); hardened backups (checksums, sanity check, freshness gauge,
optional rclone off-site) + restore.sh + hourly db-backup sidecar (ops
profile); stack.sh ops tooling (deploy/logs/health/backup/restore/monitoring);
.gitattributes LF for shell scripts.

Orchestration: json-file log rotation, pinned images, per-service memory
limits, edge/internal networks, Traefik ping/accesslog/metrics + flood
limiter, conditional minio-setup, pgvector db image, one-shot db-init
(umami + aramesh_chatbot databases).

Chatbot: unified from site-chatbot branch (RAG + pgvector, SSE, ChatWidget).

Monitoring: Prometheus/Alertmanager/Loki/Promtail/Grafana + cAdvisor,
node/postgres/blackbox exporters, provisioned dashboards and 10 alert
rules; alerts delivered to Bale (tapi.bale.ai — Telegram-compatible).

Analytics: Umami on shared Postgres, build-time tracker injection, custom
events (contact/newsletter/phone/chat/lang) via frontend/src/analytics.ts.

Hygiene: CSV export for contact messages and subscribers; upload image
optimization (Pillow); CI script + GitHub-compatible workflow; audit.sh;
gen-env.sh for strong credentials.
2026-09-19 00:24:57 +03:30