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.
This commit is contained in:
+27
-5
@@ -130,21 +130,42 @@ html[lang='en'] .article-body h3 {
|
||||
}
|
||||
.article-body h2 {
|
||||
font-size: 16px;
|
||||
padding-inline-start: 0.85rem;
|
||||
border-inline-start: 3px solid #d5874c;
|
||||
/* نوار مسی ندارد: نوار عمودی مسی نشانه اختصاصی نقلقول است و تیتر فقط با
|
||||
اندازه و وزن متمایز میشود تا با نقلقول اشتباه گرفته نشود. */
|
||||
}
|
||||
.article-body h3 {
|
||||
font-size: 14px;
|
||||
}
|
||||
/* متن مقاله در هر دو زبان همتراز (justify) است: لبههای راست و چپ یکدست میمانند.
|
||||
text-align: justify با direction درست، در فارسی و انگلیسی هر دو کار میکند. */
|
||||
[data-dir='rtl'] .article-body {
|
||||
direction: rtl;
|
||||
text-align: right;
|
||||
text-align: justify;
|
||||
text-justify: inter-word;
|
||||
}
|
||||
[data-dir='ltr'] .article-body {
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
text-align: justify;
|
||||
text-justify: inter-word;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* تیترها و فهرستها همتراز نمیشوند — فقط متن پاراگراف تراز میشود
|
||||
(تیتر کوتاه با justify کشیده و بدقلق میشود و فهرست نقطهگذاریاش بههم میریزد). */
|
||||
[data-dir='rtl'] .article-body h1,
|
||||
[data-dir='rtl'] .article-body h2,
|
||||
[data-dir='rtl'] .article-body h3,
|
||||
[data-dir='rtl'] .article-body li,
|
||||
[data-dir='rtl'] .article-body figcaption {
|
||||
text-align: right;
|
||||
}
|
||||
[data-dir='ltr'] .article-body h1,
|
||||
[data-dir='ltr'] .article-body h2,
|
||||
[data-dir='ltr'] .article-body h3,
|
||||
[data-dir='ltr'] .article-body li,
|
||||
[data-dir='ltr'] .article-body figcaption {
|
||||
text-align: left;
|
||||
}
|
||||
[data-dir='ltr'] .article-body h1 {
|
||||
font-size: 16px;
|
||||
}
|
||||
@@ -259,7 +280,8 @@ html[lang='en'] .article-body h3 {
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin-top: 0.6rem;
|
||||
text-align: right;
|
||||
/* تراز از جهت بلوک پیروی میکند — در مقاله انگلیسی چپ و در فارسی راست */
|
||||
text-align: start;
|
||||
}
|
||||
[data-wysiwyg] .article-figure-node.is-selected .article-figure {
|
||||
outline: 1px dashed rgba(213, 135, 76, 0.8);
|
||||
|
||||
Reference in New Issue
Block a user