Add Soroush CI/CD (Gitea + Nexus) + self-host fonts for offline build
CI/CD / CI - API (dotnet build + engine sim) (push) Failing after 1m40s
CI/CD / CI - Web (tsc + next build) (push) Failing after 1m20s
CI/CD / Deploy - local stack (db + server + web) (push) Has been skipped

Pipeline (.gitea/workflows/ci-cd.yml), all images/packages via Nexus mirror:
- CI api-build: dotnet restore/build server/Hokm.slnx + run Hokm.Sim (rules).
- CI web-check: npm install + tsc --noEmit + next build (static export).
- deploy (self-hosted): pre-deploy pg_dump backup, rollback image tag, build,
  bring up db -> server -> web with stop+rm+up --no-deps (no force-recreate,
  no bare compose down), health-wait each, prune.

Local stack (docker-compose.yml), ports in 1500-1600 so it coexists with manual
dev on 3000/5005:  web :1500 (nginx static) -> server :1505 (.NET) -> db :1510
(postgres, named volume + backups). Dockerfiles: server (.NET, NuGet via
nuget.docker.config, binds 0.0.0.0, busybox wget healthcheck) + web (Next static
export -> nginx, NEXT_PUBLIC_* baked as build args). nginx.conf SPA fallback.

Config: server CORS is now config-driven (Cors__Origins) so the deployed web
origin is allowed without code edits. deploy/ENV_FILE.example documents the
Gitea ENV_FILE secret; DEPLOY.md covers setup/run/LAN-IP/rollback/migrations.

Fonts: switch Vazirmatn + Plus Jakarta Sans from next/font/google (build-time
Google fetch -> fails on the Iran CI runner) to self-hosted @fontsource-variable
packages. Build is offline and ~3x faster; 7 woff2 emitted into out/.

Verified locally: dotnet build slnx + Hokm.Sim (300 matches, exit 0); tsc clean;
next build clean with self-hosted fonts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-04 19:09:31 +03:30
parent e778e8b5bd
commit 89d42184a1
15 changed files with 534 additions and 21 deletions
+6
View File
@@ -39,6 +39,12 @@
--font-sans: var(--font-vazir), var(--font-jakarta), system-ui, sans-serif;
}
:root {
/* Self-hosted @fontsource families (see app/layout.tsx imports). */
--font-vazir: "Vazirmatn Variable", system-ui, sans-serif;
--font-jakarta: "Plus Jakarta Sans Variable", system-ui, sans-serif;
}
html,
body {
height: 100%;
+4 -18
View File
@@ -1,20 +1,10 @@
import type { Metadata, Viewport } from "next";
import { Vazirmatn, Plus_Jakarta_Sans } from "next/font/google";
// Self-hosted fonts (no Google fetch at build time → CI builds work offline / in Iran).
import "@fontsource-variable/vazirmatn";
import "@fontsource-variable/plus-jakarta-sans";
import "./globals.css";
import { I18nProvider } from "@/lib/i18n";
const vazir = Vazirmatn({
variable: "--font-vazir",
subsets: ["arabic", "latin"],
display: "swap",
});
const jakarta = Plus_Jakarta_Sans({
variable: "--font-jakarta",
subsets: ["latin"],
display: "swap",
});
export const metadata: Metadata = {
title: "برگ وسط | Barg-e Vasat — بازی حکم آنلاین",
description: "برگ وسط — بازی حکم آنلاین ایرانی با حریف‌های واقعی و هوشمند (Barg-e Vasat — online Persian Hokm)",
@@ -34,11 +24,7 @@ export default function RootLayout({
children,
}: Readonly<{ children: React.ReactNode }>) {
return (
<html
lang="fa"
dir="rtl"
className={`${vazir.variable} ${jakarta.variable} h-full antialiased`}
>
<html lang="fa" dir="rtl" className="h-full antialiased">
<body className="min-h-full">
<I18nProvider>{children}</I18nProvider>
</body>