feat: add PersistentVolume for CMS uploads + apply manifests in CI/CD
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 12m12s

- Add k8s/staging/ and k8s/production/ deployment manifests
- PVC 20Gi for /app/Uploads (file uploads persist across pod restarts)
- FileStorage__UploadPath env var set to /app/Uploads
- Replicas reduced to 1 (ReadWriteOnce PVC)
- Pipelines now: create namespace → apply manifests → restart/update
This commit is contained in:
masoodafar-web
2026-02-23 20:11:56 +03:30
parent 8cdb197ee7
commit 3153fd8a74
4 changed files with 330 additions and 4 deletions
+10 -2
View File
@@ -86,8 +86,16 @@ jobs:
- name: Deploy to Kubernetes
run: |
export SSHPASS="${{ secrets.SERVER_PASSWORD }}"
# Copy K8s manifests to server
sshpass -e scp -o StrictHostKeyChecking=no k8s/staging/cms-deployment.yaml root@${{ env.K8S_SERVER }}:/tmp/cms-deployment.yaml
# Apply manifests and restart
sshpass -e ssh -o StrictHostKeyChecking=no root@${{ env.K8S_SERVER }} "
kubectl rollout restart deployment/cms
kubectl rollout status deployment/cms --timeout=180s
kubectl create namespace foursat --dry-run=client -o yaml | kubectl apply -f - &&
kubectl apply -f /tmp/cms-deployment.yaml &&
kubectl rollout restart deployment/cms -n foursat &&
kubectl rollout status deployment/cms -n foursat --timeout=180s &&
rm -f /tmp/cms-deployment.yaml
"
echo "✅ Deployed!"