Files
football-next/DEPLOY_STEPS.md

54 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# مراحل دیپلوی برای سرورهای ایران
## گام ۱: دانلود Prisma Engines (فقط یک بار)
روی سیستم با دسترسی به اینترنت (لپ‌تاپ با VPN):
```bash
chmod +x scripts/download-prisma-engines.sh
bash scripts/download-prisma-engines.sh
```
## گام ۲: Commit و Push
```bash
git add prisma/engines Dockerfile package.json DEPLOY_IRAN.md
git commit -m "feat: Add Prisma engines for offline deployment"
git push
```
## گام ۳: Deploy در Coolify
Coolify به صورت خودکار تغییرات را تشخیص داده و deploy می‌کند.
## نکته مهم
اگر اسکریپت دانلود کار نکرد، از روش manual استفاده کنید:
```bash
# دریافت Prisma version
PRISMA_VERSION=$(node -p "require('./package.json').dependencies['@prisma/client']")
echo "Prisma version: $PRISMA_VERSION"
# دانلود manual engines
mkdir -p prisma/engines
cd prisma/engines
# Query Engine
curl -L "https://binaries.prisma.sh/all_commits/c2990dca591cba766e3b7ef5d9e8a84796e47ab7/linux-musl-openssl-3.0.x/query-engine.gz" | gunzip > query-engine
chmod +x query-engine
# Schema Engine
curl -L "https://binaries.prisma.sh/all_commits/c2990dca591cba766e3b7ef5d9e8a84796e47ab7/linux-musl-openssl-3.0.x/schema-engine.gz" | gunzip > schema-engine
chmod +x schema-engine
cd ../..
```
## عیب‌یابی
اگر build شکست خورد:
1. بررسی کنید فایل‌های `prisma/engines/*` وجود دارند
2. بررسی کنید executable هستند: `ls -la prisma/engines`
3. از روش "Build Local" در `DEPLOY_IRAN.md` استفاده کنید