apiVersion: apps/v1 kind: Deployment metadata: name: hosting-backend namespace: hosting spec: replicas: 1 selector: matchLabels: app: hosting-backend template: metadata: labels: app: hosting-backend spec: containers: - name: hosting-backend image: gitea.vidoks.fr/sortifal/hosting-backend-prod:latest ports: - containerPort: 80 env: - name: FRONTEND_URL value: https://portfolio-host.com volumeMounts: - name: ssh-key mountPath: /root/.ssh readOnly: true lifecycle: postStart: exec: command: ["php", "artisan", "migrate", "--force"] volumes: - name: ssh-key secret: secretName: ansible-ssh-key defaultMode: 0400