feat: add PersistentVolume for CMS uploads + apply manifests in CI/CD
Build and Deploy to Production / build-and-deploy (push) Failing after 8m12s
Build and Deploy to Production / build-and-deploy (push) Failing after 8m12s
- 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:
@@ -88,8 +88,16 @@ jobs:
|
||||
- name: Deploy to Production
|
||||
run: |
|
||||
export SSHPASS="${{ secrets.SERVER_PASSWORD }}"
|
||||
|
||||
# Copy K8s manifests to server
|
||||
sshpass -e scp -o StrictHostKeyChecking=no k8s/production/cms-deployment.yaml root@${{ env.K8S_SERVER }}:/tmp/cms-deployment.yaml
|
||||
|
||||
# Apply manifests and update image
|
||||
sshpass -e ssh -o StrictHostKeyChecking=no root@${{ env.K8S_SERVER }} "
|
||||
kubectl set image deployment/cms cms=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
|
||||
kubectl rollout status deployment/cms --timeout=300s
|
||||
kubectl create namespace foursat --dry-run=client -o yaml | kubectl apply -f - &&
|
||||
kubectl apply -f /tmp/cms-deployment.yaml &&
|
||||
kubectl set image deployment/cms cms=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} -n foursat &&
|
||||
kubectl rollout status deployment/cms -n foursat --timeout=300s &&
|
||||
rm -f /tmp/cms-deployment.yaml
|
||||
"
|
||||
echo "✅ Deployed to Production!"
|
||||
|
||||
Reference in New Issue
Block a user