Alexis Bruneteau 161c95e458
Some checks failed
Build and Deploy to k3s / build-and-deploy (push) Failing after 29s
tag
2025-06-05 06:24:25 +02:00

39 lines
958 B
YAML

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
- name: ANSIBLE_HOST_KEY_CHECKING
value: False
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