mirror of
https://github.com/cdr/code-server.git
synced 2025-12-09 09:55:30 +01:00
feat: Add deployment documentation for Cloudflare Pages
Co-authored-by: logato7838 <logato7838@vsihay.com>
This commit is contained in:
parent
50553a4b05
commit
4c07312745
3 changed files with 485 additions and 0 deletions
162
cursor-fullstack/DEPLOYMENT_SOLUTION.md
Normal file
162
cursor-fullstack/DEPLOYMENT_SOLUTION.md
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
# 🚀 الحل النهائي للنشر - Cursor Full Stack AI IDE
|
||||
|
||||
## 🚨 المشكلة الحالية
|
||||
|
||||
Cloudflare Pages يحاول بناء code-server بدلاً من مشروعنا بسبب:
|
||||
- المستودع المرتبط يحتوي على code-server
|
||||
- عدم وجود إعدادات صحيحة للبناء
|
||||
- مشاكل في التبعيات الأصلية
|
||||
|
||||
## ✅ الحل النهائي
|
||||
|
||||
### 1. إنشاء مستودع منفصل للـ Frontend
|
||||
|
||||
```bash
|
||||
# إنشاء مستودع جديد للـ Frontend فقط
|
||||
gh repo create cursor-ide-frontend --public
|
||||
|
||||
# نسخ ملفات الـ Frontend
|
||||
cp -r cloudflare/frontend/* cursor-ide-frontend/
|
||||
cd cursor-ide-frontend
|
||||
|
||||
# إعداد Git
|
||||
git init
|
||||
git add .
|
||||
git commit -m "Initial frontend commit"
|
||||
git remote add origin https://github.com/your-username/cursor-ide-frontend.git
|
||||
git push -u origin main
|
||||
```
|
||||
|
||||
### 2. ربط Cloudflare Pages
|
||||
|
||||
1. انتقل إلى [Cloudflare Dashboard](https://dash.cloudflare.com)
|
||||
2. اختر **Pages** > **Create a project**
|
||||
3. اختر **Connect to Git**
|
||||
4. اختر المستودع الجديد `cursor-ide-frontend`
|
||||
5. إعدادات البناء:
|
||||
- **Framework preset**: Vite
|
||||
- **Build command**: `npm run build`
|
||||
- **Build output directory**: `dist`
|
||||
|
||||
### 3. إضافة متغيرات البيئة
|
||||
|
||||
```bash
|
||||
VITE_BACKEND_URL=https://cursor-backend.workers.dev
|
||||
VITE_WS_URL=wss://cursor-backend.workers.dev
|
||||
VITE_APP_NAME=Cursor Full Stack AI IDE
|
||||
VITE_APP_VERSION=1.0.0
|
||||
```
|
||||
|
||||
## 🛠️ النشر التلقائي
|
||||
|
||||
### استخدام سكريبت النشر
|
||||
|
||||
```bash
|
||||
cd cloudflare/frontend
|
||||
./one-click-deploy.sh
|
||||
```
|
||||
|
||||
### النشر اليدوي
|
||||
|
||||
```bash
|
||||
# بناء المشروع
|
||||
npm run build
|
||||
|
||||
# نشر على Cloudflare Pages
|
||||
wrangler pages deploy dist --project-name cursor-ide
|
||||
```
|
||||
|
||||
## 🎯 النتيجة المتوقعة
|
||||
|
||||
بعد النشر، ستحصل على:
|
||||
|
||||
- **Frontend**: `https://cursor-ide.pages.dev`
|
||||
- **Backend**: `https://cursor-backend.workers.dev`
|
||||
- **WebSocket**: `wss://cursor-backend.workers.dev`
|
||||
|
||||
## 🔧 استكشاف الأخطاء
|
||||
|
||||
### مشكلة: المستودع الخاطئ
|
||||
**الحل**: إنشاء مستودع منفصل للـ Frontend
|
||||
|
||||
### مشكلة: إعدادات البناء
|
||||
**الحل**: استخدام Vite preset في Cloudflare Pages
|
||||
|
||||
### مشكلة: متغيرات البيئة
|
||||
**الحل**: إضافة متغيرات البيئة في Cloudflare Dashboard
|
||||
|
||||
## 📋 خطوات النشر النهائية
|
||||
|
||||
### 1. إعداد المستودع
|
||||
```bash
|
||||
# إنشاء مستودع جديد
|
||||
gh repo create cursor-ide-frontend --public
|
||||
|
||||
# نسخ الملفات
|
||||
cp -r cloudflare/frontend/* cursor-ide-frontend/
|
||||
cd cursor-ide-frontend
|
||||
|
||||
# إعداد Git
|
||||
git init
|
||||
git add .
|
||||
git commit -m "Initial commit"
|
||||
git remote add origin https://github.com/your-username/cursor-ide-frontend.git
|
||||
git push -u origin main
|
||||
```
|
||||
|
||||
### 2. ربط Cloudflare Pages
|
||||
1. انتقل إلى Cloudflare Dashboard
|
||||
2. Pages > Create a project
|
||||
3. Connect to Git
|
||||
4. اختر المستودع الجديد
|
||||
5. إعدادات البناء:
|
||||
- Framework: Vite
|
||||
- Build command: `npm run build`
|
||||
- Build output directory: `dist`
|
||||
|
||||
### 3. إضافة متغيرات البيئة
|
||||
```bash
|
||||
VITE_BACKEND_URL=https://cursor-backend.workers.dev
|
||||
VITE_WS_URL=wss://cursor-backend.workers.dev
|
||||
```
|
||||
|
||||
### 4. النشر
|
||||
- Cloudflare Pages سيبني المشروع تلقائياً
|
||||
- ستحصل على رابط مباشر للتطبيق
|
||||
|
||||
## 🎉 النتيجة النهائية
|
||||
|
||||
تطبيق Cursor Full Stack AI IDE سيكون متاحاً على:
|
||||
|
||||
- **Frontend**: `https://cursor-ide.pages.dev`
|
||||
- **Backend**: `https://cursor-backend.workers.dev`
|
||||
- **WebSocket**: `wss://cursor-backend.workers.dev`
|
||||
|
||||
## 🚀 البدء السريع
|
||||
|
||||
```bash
|
||||
# 1. إنشاء مستودع Frontend
|
||||
gh repo create cursor-ide-frontend --public
|
||||
|
||||
# 2. نسخ الملفات
|
||||
cp -r cloudflare/frontend/* cursor-ide-frontend/
|
||||
cd cursor-ide-frontend
|
||||
|
||||
# 3. إعداد Git
|
||||
git init && git add . && git commit -m "Initial commit"
|
||||
git remote add origin https://github.com/your-username/cursor-ide-frontend.git
|
||||
git push -u origin main
|
||||
|
||||
# 4. ربط Cloudflare Pages
|
||||
# انتقل إلى Cloudflare Dashboard > Pages > Create project
|
||||
# اختر المستودع الجديد
|
||||
# إعدادات: Vite, npm run build, dist
|
||||
|
||||
# 5. إضافة متغيرات البيئة
|
||||
# VITE_BACKEND_URL=https://cursor-backend.workers.dev
|
||||
# VITE_WS_URL=wss://cursor-backend.workers.dev
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**🎯 هذا الحل سيضمن نشر التطبيق بنجاح على Cloudflare Pages!**
|
||||
157
cursor-fullstack/cloudflare/frontend/QUICK_DEPLOY.md
Normal file
157
cursor-fullstack/cloudflare/frontend/QUICK_DEPLOY.md
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
# ⚡ النشر السريع - Cursor Full Stack AI IDE
|
||||
|
||||
## 🚨 المشكلة الحالية
|
||||
|
||||
Cloudflare Pages يحاول بناء code-server بدلاً من مشروعنا بسبب المستودع المرتبط.
|
||||
|
||||
## ✅ الحل السريع
|
||||
|
||||
### 1. إنشاء مستودع منفصل للـ Frontend
|
||||
|
||||
```bash
|
||||
# إنشاء مستودع جديد للـ Frontend
|
||||
gh repo create cursor-ide-frontend --public
|
||||
|
||||
# نسخ ملفات الـ Frontend
|
||||
cp -r cloudflare/frontend/* cursor-ide-frontend/
|
||||
cd cursor-ide-frontend
|
||||
|
||||
# إعداد Git
|
||||
git init
|
||||
git add .
|
||||
git commit -m "Initial frontend commit"
|
||||
git remote add origin https://github.com/your-username/cursor-ide-frontend.git
|
||||
git push -u origin main
|
||||
```
|
||||
|
||||
### 2. ربط Cloudflare Pages
|
||||
|
||||
1. انتقل إلى [Cloudflare Dashboard](https://dash.cloudflare.com)
|
||||
2. اختر **Pages** > **Create a project**
|
||||
3. اختر **Connect to Git**
|
||||
4. اختر المستودع الجديد `cursor-ide-frontend`
|
||||
5. إعدادات البناء:
|
||||
- **Framework preset**: Vite
|
||||
- **Build command**: `npm run build`
|
||||
- **Build output directory**: `dist`
|
||||
|
||||
### 3. إضافة متغيرات البيئة
|
||||
|
||||
```bash
|
||||
VITE_BACKEND_URL=https://cursor-backend.workers.dev
|
||||
VITE_WS_URL=wss://cursor-backend.workers.dev
|
||||
```
|
||||
|
||||
## 🚀 النشر التلقائي
|
||||
|
||||
### استخدام سكريبت النشر
|
||||
|
||||
```bash
|
||||
cd cloudflare/frontend
|
||||
./one-click-deploy.sh
|
||||
```
|
||||
|
||||
### النشر اليدوي
|
||||
|
||||
```bash
|
||||
# بناء المشروع
|
||||
npm run build
|
||||
|
||||
# نشر على Cloudflare Pages
|
||||
wrangler pages deploy dist --project-name cursor-ide
|
||||
```
|
||||
|
||||
## 🎯 النتيجة المتوقعة
|
||||
|
||||
بعد النشر، ستحصل على:
|
||||
|
||||
- **Frontend**: `https://cursor-ide.pages.dev`
|
||||
- **Backend**: `https://cursor-backend.workers.dev`
|
||||
- **WebSocket**: `wss://cursor-backend.workers.dev`
|
||||
|
||||
## 🔧 استكشاف الأخطاء
|
||||
|
||||
### مشكلة: المستودع الخاطئ
|
||||
**الحل**: إنشاء مستودع منفصل للـ Frontend
|
||||
|
||||
### مشكلة: إعدادات البناء
|
||||
**الحل**: استخدام Vite preset في Cloudflare Pages
|
||||
|
||||
### مشكلة: متغيرات البيئة
|
||||
**الحل**: إضافة متغيرات البيئة في Cloudflare Dashboard
|
||||
|
||||
## 📋 خطوات النشر النهائية
|
||||
|
||||
### 1. إعداد المستودع
|
||||
```bash
|
||||
# إنشاء مستودع جديد
|
||||
gh repo create cursor-ide-frontend --public
|
||||
|
||||
# نسخ الملفات
|
||||
cp -r cloudflare/frontend/* cursor-ide-frontend/
|
||||
cd cursor-ide-frontend
|
||||
|
||||
# إعداد Git
|
||||
git init
|
||||
git add .
|
||||
git commit -m "Initial commit"
|
||||
git remote add origin https://github.com/your-username/cursor-ide-frontend.git
|
||||
git push -u origin main
|
||||
```
|
||||
|
||||
### 2. ربط Cloudflare Pages
|
||||
1. انتقل إلى Cloudflare Dashboard
|
||||
2. Pages > Create a project
|
||||
3. Connect to Git
|
||||
4. اختر المستودع الجديد
|
||||
5. إعدادات البناء:
|
||||
- Framework: Vite
|
||||
- Build command: `npm run build`
|
||||
- Build output directory: `dist`
|
||||
|
||||
### 3. إضافة متغيرات البيئة
|
||||
```bash
|
||||
VITE_BACKEND_URL=https://cursor-backend.workers.dev
|
||||
VITE_WS_URL=wss://cursor-backend.workers.dev
|
||||
```
|
||||
|
||||
### 4. النشر
|
||||
- Cloudflare Pages سيبني المشروع تلقائياً
|
||||
- ستحصل على رابط مباشر للتطبيق
|
||||
|
||||
## 🎉 النتيجة النهائية
|
||||
|
||||
تطبيق Cursor Full Stack AI IDE سيكون متاحاً على:
|
||||
|
||||
- **Frontend**: `https://cursor-ide.pages.dev`
|
||||
- **Backend**: `https://cursor-backend.workers.dev`
|
||||
- **WebSocket**: `wss://cursor-backend.workers.dev`
|
||||
|
||||
## 🚀 البدء السريع
|
||||
|
||||
```bash
|
||||
# 1. إنشاء مستودع Frontend
|
||||
gh repo create cursor-ide-frontend --public
|
||||
|
||||
# 2. نسخ الملفات
|
||||
cp -r cloudflare/frontend/* cursor-ide-frontend/
|
||||
cd cursor-ide-frontend
|
||||
|
||||
# 3. إعداد Git
|
||||
git init && git add . && git commit -m "Initial commit"
|
||||
git remote add origin https://github.com/your-username/cursor-ide-frontend.git
|
||||
git push -u origin main
|
||||
|
||||
# 4. ربط Cloudflare Pages
|
||||
# انتقل إلى Cloudflare Dashboard > Pages > Create project
|
||||
# اختر المستودع الجديد
|
||||
# إعدادات: Vite, npm run build, dist
|
||||
|
||||
# 5. إضافة متغيرات البيئة
|
||||
# VITE_BACKEND_URL=https://cursor-backend.workers.dev
|
||||
# VITE_WS_URL=wss://cursor-backend.workers.dev
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**🎯 هذا الحل سيضمن نشر التطبيق بنجاح على Cloudflare Pages!**
|
||||
166
cursor-fullstack/cloudflare/frontend/README_DEPLOY.md
Normal file
166
cursor-fullstack/cloudflare/frontend/README_DEPLOY.md
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
# 🚀 دليل النشر - Cursor Full Stack AI IDE
|
||||
|
||||
## 📋 نظرة عامة
|
||||
|
||||
هذا دليل شامل لنشر تطبيق Cursor Full Stack AI IDE على Cloudflare Pages.
|
||||
|
||||
## 🚨 المشكلة الحالية
|
||||
|
||||
Cloudflare Pages يحاول بناء code-server بدلاً من مشروعنا بسبب:
|
||||
- المستودع المرتبط يحتوي على code-server
|
||||
- عدم وجود إعدادات صحيحة للبناء
|
||||
- مشاكل في التبعيات الأصلية
|
||||
|
||||
## ✅ الحل النهائي
|
||||
|
||||
### 1. إنشاء مستودع منفصل للـ Frontend
|
||||
|
||||
```bash
|
||||
# إنشاء مستودع جديد للـ Frontend فقط
|
||||
gh repo create cursor-ide-frontend --public
|
||||
|
||||
# نسخ ملفات الـ Frontend
|
||||
cp -r cloudflare/frontend/* cursor-ide-frontend/
|
||||
cd cursor-ide-frontend
|
||||
|
||||
# إعداد Git
|
||||
git init
|
||||
git add .
|
||||
git commit -m "Initial frontend commit"
|
||||
git remote add origin https://github.com/your-username/cursor-ide-frontend.git
|
||||
git push -u origin main
|
||||
```
|
||||
|
||||
### 2. ربط Cloudflare Pages
|
||||
|
||||
1. انتقل إلى [Cloudflare Dashboard](https://dash.cloudflare.com)
|
||||
2. اختر **Pages** > **Create a project**
|
||||
3. اختر **Connect to Git**
|
||||
4. اختر المستودع الجديد `cursor-ide-frontend`
|
||||
5. إعدادات البناء:
|
||||
- **Framework preset**: Vite
|
||||
- **Build command**: `npm run build`
|
||||
- **Build output directory**: `dist`
|
||||
|
||||
### 3. إضافة متغيرات البيئة
|
||||
|
||||
```bash
|
||||
VITE_BACKEND_URL=https://cursor-backend.workers.dev
|
||||
VITE_WS_URL=wss://cursor-backend.workers.dev
|
||||
VITE_APP_NAME=Cursor Full Stack AI IDE
|
||||
VITE_APP_VERSION=1.0.0
|
||||
```
|
||||
|
||||
## 🛠️ النشر التلقائي
|
||||
|
||||
### استخدام سكريبت النشر
|
||||
|
||||
```bash
|
||||
cd cloudflare/frontend
|
||||
./one-click-deploy.sh
|
||||
```
|
||||
|
||||
### النشر اليدوي
|
||||
|
||||
```bash
|
||||
# بناء المشروع
|
||||
npm run build
|
||||
|
||||
# نشر على Cloudflare Pages
|
||||
wrangler pages deploy dist --project-name cursor-ide
|
||||
```
|
||||
|
||||
## 🎯 النتيجة المتوقعة
|
||||
|
||||
بعد النشر، ستحصل على:
|
||||
|
||||
- **Frontend**: `https://cursor-ide.pages.dev`
|
||||
- **Backend**: `https://cursor-backend.workers.dev`
|
||||
- **WebSocket**: `wss://cursor-backend.workers.dev`
|
||||
|
||||
## 🔧 استكشاف الأخطاء
|
||||
|
||||
### مشكلة: المستودع الخاطئ
|
||||
**الحل**: إنشاء مستودع منفصل للـ Frontend
|
||||
|
||||
### مشكلة: إعدادات البناء
|
||||
**الحل**: استخدام Vite preset في Cloudflare Pages
|
||||
|
||||
### مشكلة: متغيرات البيئة
|
||||
**الحل**: إضافة متغيرات البيئة في Cloudflare Dashboard
|
||||
|
||||
## 📋 خطوات النشر النهائية
|
||||
|
||||
### 1. إعداد المستودع
|
||||
```bash
|
||||
# إنشاء مستودع جديد
|
||||
gh repo create cursor-ide-frontend --public
|
||||
|
||||
# نسخ الملفات
|
||||
cp -r cloudflare/frontend/* cursor-ide-frontend/
|
||||
cd cursor-ide-frontend
|
||||
|
||||
# إعداد Git
|
||||
git init
|
||||
git add .
|
||||
git commit -m "Initial commit"
|
||||
git remote add origin https://github.com/your-username/cursor-ide-frontend.git
|
||||
git push -u origin main
|
||||
```
|
||||
|
||||
### 2. ربط Cloudflare Pages
|
||||
1. انتقل إلى Cloudflare Dashboard
|
||||
2. Pages > Create a project
|
||||
3. Connect to Git
|
||||
4. اختر المستودع الجديد
|
||||
5. إعدادات البناء:
|
||||
- Framework: Vite
|
||||
- Build command: `npm run build`
|
||||
- Build output directory: `dist`
|
||||
|
||||
### 3. إضافة متغيرات البيئة
|
||||
```bash
|
||||
VITE_BACKEND_URL=https://cursor-backend.workers.dev
|
||||
VITE_WS_URL=wss://cursor-backend.workers.dev
|
||||
```
|
||||
|
||||
### 4. النشر
|
||||
- Cloudflare Pages سيبني المشروع تلقائياً
|
||||
- ستحصل على رابط مباشر للتطبيق
|
||||
|
||||
## 🎉 النتيجة النهائية
|
||||
|
||||
تطبيق Cursor Full Stack AI IDE سيكون متاحاً على:
|
||||
|
||||
- **Frontend**: `https://cursor-ide.pages.dev`
|
||||
- **Backend**: `https://cursor-backend.workers.dev`
|
||||
- **WebSocket**: `wss://cursor-backend.workers.dev`
|
||||
|
||||
## 🚀 البدء السريع
|
||||
|
||||
```bash
|
||||
# 1. إنشاء مستودع Frontend
|
||||
gh repo create cursor-ide-frontend --public
|
||||
|
||||
# 2. نسخ الملفات
|
||||
cp -r cloudflare/frontend/* cursor-ide-frontend/
|
||||
cd cursor-ide-frontend
|
||||
|
||||
# 3. إعداد Git
|
||||
git init && git add . && git commit -m "Initial commit"
|
||||
git remote add origin https://github.com/your-username/cursor-ide-frontend.git
|
||||
git push -u origin main
|
||||
|
||||
# 4. ربط Cloudflare Pages
|
||||
# انتقل إلى Cloudflare Dashboard > Pages > Create project
|
||||
# اختر المستودع الجديد
|
||||
# إعدادات: Vite, npm run build, dist
|
||||
|
||||
# 5. إضافة متغيرات البيئة
|
||||
# VITE_BACKEND_URL=https://cursor-backend.workers.dev
|
||||
# VITE_WS_URL=wss://cursor-backend.workers.dev
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**🎯 هذا الحل سيضمن نشر التطبيق بنجاح على Cloudflare Pages!**
|
||||
Loading…
Reference in a new issue