Files
peikarband/helm/peikarband
Ehsan.Asadi 432aa63e36 feat: implement complete CI/CD with base image strategy
- Add Woodpecker pipeline with base image support
- Separate base image build (.woodpecker-base.yml) from app build (.woodpecker.yml)
- Implement build/push separation in application pipeline
- Create Docker base image with Python 3.11, Node.js 20, and bun
- Update Dockerfile to use pre-built base image for faster builds
- Remove GitHub Actions (not needed, using Woodpecker)
- Fix Docker contexts and paths for new structure
- Update docker-compose.yml build contexts
- Fix rxconfig.py DB path for container environment
- Add ArgoCD application manifests for staging/production
- Create comprehensive documentation:
  - docs/WOODPECKER_CI_CD.md (CI/CD guide)
  - docs/BASE_IMAGE_MANAGEMENT.md (Base image management)
  - helm/peikarband/argocd/README.md (ArgoCD deployment)

Benefits:
- Build time: 8-10min → 2-3min (60-70% faster)
- Better reliability (no repeated npm/bun downloads)
- Separation of concerns (base vs application builds)
- Full pipeline: check → build → push → verify → notify
- Complete deployment automation with Helm + ArgoCD

Pipeline stages:
1. check-base-image: Verify base image availability
2. build-image: Build application (no push)
3. push-image: Push with multi-tags (latest, sha, branch)
4. verify-push: Verify successful push
5. notify: Success/failure notifications

Base image can be rebuilt via:
- Manual trigger in Woodpecker UI
- Auto trigger when Dockerfile.base changes
2025-12-30 21:50:45 +03:30
..

Peikarband Helm Chart

Official Helm chart برای deploy کردن Peikarband Cloud Platform.

نصب

اضافه کردن Repository

helm repo add peikarband https://peikarband.github.io/charts
helm repo update

نصب Chart

helm install peikarband peikarband/peikarband \
  --namespace production \
  --create-namespace \
  --set image.tag=0.1.0

پیکربندی

مهم‌ترین Values

Key Type Default Description
replicaCount int 2 تعداد replicas
image.repository string registry.example.com/peikarband/landing Docker image repository
image.tag string latest Image tag
image.pullPolicy string IfNotPresent Image pull policy
resources.limits.cpu string 1000m CPU limit
resources.limits.memory string 1Gi Memory limit
autoscaling.enabled bool true فعال کردن HPA
autoscaling.minReplicas int 2 حداقل replicas
autoscaling.maxReplicas int 10 حداکثر replicas
ingress.enabled bool true فعال کردن Ingress
ingress.hosts[0].host string peikarband.ir Domain

مثال‌های استفاده

نصب با مقادیر سفارشی

helm install peikarband peikarband/peikarband \
  --set image.tag=0.2.0 \
  --set replicaCount=3 \
  --set resources.limits.cpu=2000m \
  --set ingress.hosts[0].host=example.com

استفاده از values file

helm install peikarband peikarband/peikarband \
  -f my-values.yaml

Upgrade

helm upgrade peikarband peikarband/peikarband \
  --set image.tag=0.3.0 \
  --reuse-values

Requirements

  • Kubernetes 1.24+
  • Helm 3.10+
  • PostgreSQL (external یا in-cluster)
  • Redis (external یا in-cluster)

Values فایل‌ها

این chart شامل چند values file است:

  • values.yaml - مقادیر پیش‌فرض
  • values-production.yaml - تنظیمات production

Components

این Chart شامل موارد زیر است:

  • Deployment: اجرای application
  • Service: ClusterIP service برای internal access
  • Ingress: External access با TLS
  • ConfigMap: تنظیمات application
  • ServiceAccount: Kubernetes service account
  • HPA: Horizontal Pod Autoscaler
  • PDB: Pod Disruption Budget
  • NetworkPolicy: محدودیت‌های network

پیش‌نیازها

ساخت Secrets

kubectl create secret generic peikarband-secrets \
  --from-literal=db-username=USERNAME \
  --from-literal=db-password=PASSWORD \
  --from-literal=redis-password=REDIS_PASS \
  -n production

cert-manager (برای TLS)

kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.0/cert-manager.yaml

Troubleshooting

مشاهده وضعیت

helm status peikarband -n production
kubectl get all -n production
kubectl get pods -l app.kubernetes.io/name=peikarband -n production

مشاهده Logs

kubectl logs -f deployment/peikarband -n production

Rollback

helm rollback peikarband -n production

توسعه

Lint

helm lint .

Template

helm template peikarband . --debug

Package

helm package .

لایسنس

MIT

پشتیبانی