Some checks failed
CD - Build & Deploy / build-and-push (push) Has been cancelled
CD - Build & Deploy / package-helm (push) Has been cancelled
CD - Build & Deploy / deploy-staging (push) Has been cancelled
CD - Build & Deploy / deploy-production (push) Has been cancelled
CD - Build & Deploy / release (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / security (push) Has been cancelled
- Implemented Clean Architecture with Domain, Application, Infrastructure, Presentation layers - Added comprehensive project structure following SOLID principles - Created Kubernetes deployment with Helm charts (HPA, PDB, NetworkPolicy) - Configured ArgoCD for automated deployment (production + staging) - Implemented CI/CD pipeline with GitHub Actions - Added comprehensive documentation (handbook, architecture, coding standards) - Configured PostgreSQL, Redis, Celery for backend services - Created modern landing page with Persian fonts (Vazirmatn) - Added Docker multi-stage build for production - Configured development tools (pytest, black, flake8, mypy, isort) - Added pre-commit hooks for code quality - Implemented Makefile for common operations
105 lines
2.2 KiB
Markdown
105 lines
2.2 KiB
Markdown
# Quick Start - Deploy در 5 دقیقه
|
|
|
|
راهنمای سریع برای deploy کردن Peikarband روی Kubernetes.
|
|
|
|
## پیشنیاز
|
|
|
|
- Kubernetes cluster (v1.24+)
|
|
- Helm 3 نصب شده
|
|
- kubectl پیکربندی شده
|
|
- دسترسی به یک Container Registry
|
|
|
|
## مراحل
|
|
|
|
### 1. Clone Repository
|
|
|
|
```bash
|
|
git clone https://github.com/peikarband/landing.git
|
|
cd landing
|
|
```
|
|
|
|
### 2. Build Docker Image
|
|
|
|
```bash
|
|
# تغییر REGISTRY به registry خودتون
|
|
export REGISTRY=registry.example.com
|
|
export IMAGE_NAME=peikarband/landing
|
|
export VERSION=0.1.0
|
|
|
|
docker build -t ${REGISTRY}/${IMAGE_NAME}:${VERSION} .
|
|
docker push ${REGISTRY}/${IMAGE_NAME}:${VERSION}
|
|
```
|
|
|
|
### 3. ساخت Secrets
|
|
|
|
```bash
|
|
kubectl create namespace production
|
|
|
|
kubectl create secret generic peikarband-secrets \
|
|
--from-literal=db-username=peikarband \
|
|
--from-literal=db-password=YOUR_STRONG_PASSWORD \
|
|
--from-literal=redis-password=YOUR_REDIS_PASSWORD \
|
|
-n production
|
|
```
|
|
|
|
### 4. Deploy با Helm
|
|
|
|
```bash
|
|
helm upgrade --install peikarband ./helm/peikarband \
|
|
--namespace production \
|
|
--set image.repository=${REGISTRY}/${IMAGE_NAME} \
|
|
--set image.tag=${VERSION} \
|
|
--set ingress.hosts[0].host=yourdomain.com \
|
|
--wait
|
|
```
|
|
|
|
### 5. چک کردن وضعیت
|
|
|
|
```bash
|
|
# Pods
|
|
kubectl get pods -n production
|
|
|
|
# Service
|
|
kubectl get svc -n production
|
|
|
|
# Ingress
|
|
kubectl get ingress -n production
|
|
```
|
|
|
|
### 6. دسترسی به Application
|
|
|
|
```bash
|
|
# Port forward برای تست
|
|
kubectl port-forward svc/peikarband 3000:3000 -n production
|
|
|
|
# باز کردن در browser
|
|
open http://localhost:3000
|
|
```
|
|
|
|
## پیکربندی Production
|
|
|
|
برای production از `values-production.yaml` استفاده کنید:
|
|
|
|
```bash
|
|
helm upgrade --install peikarband ./helm/peikarband \
|
|
--namespace production \
|
|
--set image.repository=${REGISTRY}/${IMAGE_NAME} \
|
|
--set image.tag=${VERSION} \
|
|
--values helm/peikarband/values-production.yaml \
|
|
--wait
|
|
```
|
|
|
|
## Uninstall
|
|
|
|
```bash
|
|
helm uninstall peikarband -n production
|
|
kubectl delete namespace production
|
|
```
|
|
|
|
## بعدش چی؟
|
|
|
|
- [مستندات کامل Kubernetes](./kubernetes.md)
|
|
- [راهنمای CI/CD](../development/ci-cd.md)
|
|
- [Troubleshooting](./troubleshooting.md)
|
|
|