83 lines
1.5 KiB
YAML
83 lines
1.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: symfony
|
|
namespace: symfony
|
|
labels:
|
|
app: symfony
|
|
|
|
spec:
|
|
replicas: 1
|
|
|
|
selector:
|
|
matchLabels:
|
|
app: symfony
|
|
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: symfony
|
|
|
|
spec:
|
|
nodeSelector:
|
|
kubernetes.io/hostname: cluster-01
|
|
command:
|
|
- php
|
|
- bin/console
|
|
- doctrine:migrations:migrate
|
|
- --no-interaction
|
|
|
|
containers:
|
|
- name: symfony
|
|
image: symfony-k3s:dev-8
|
|
imagePullPolicy: Never
|
|
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
|
|
env:
|
|
- name: APP_ENV
|
|
value: prod
|
|
|
|
- name: APP_DEBUG
|
|
value: "0"
|
|
|
|
# - name: APP_ENV
|
|
# value: dev
|
|
|
|
# - name: APP_DEBUG
|
|
# value: "1"
|
|
|
|
- name: SERVER_NAME
|
|
value: ":8080"
|
|
|
|
- name: DATABASE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: symfony-database
|
|
key: DATABASE_URL
|
|
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 3
|
|
periodSeconds: 10
|
|
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 20
|
|
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 64Mi
|
|
|
|
limits:
|
|
cpu: "1"
|
|
memory: 512Mi
|