54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: website
|
|
namespace: portfolio
|
|
labels:
|
|
app: portfolio
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: portfolio
|
|
template:
|
|
metadata:
|
|
namespace: portfolio
|
|
labels:
|
|
app: portfolio
|
|
spec:
|
|
nodeName: vps-10b6d432
|
|
containers:
|
|
- image: website-image
|
|
imagePullPolicy: Always
|
|
name: website
|
|
ports:
|
|
- containerPort: 80
|
|
name: http
|
|
volumeMounts:
|
|
- name: env
|
|
mountPath: /app/.env
|
|
subPath: .env.production
|
|
- image: mysql:5
|
|
name: mysql
|
|
env:
|
|
- name: MYSQL_ROOT_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mysql-pass
|
|
key: password
|
|
ports:
|
|
- containerPort: 3306
|
|
name: mysql
|
|
volumeMounts:
|
|
- name: portfolio-persistent-storage
|
|
subPath: mysql
|
|
mountPath: /var/lib/mysql
|
|
volumes:
|
|
- name: env
|
|
configMap:
|
|
name: env-cm
|
|
- name: portfolio-persistent-storage
|
|
persistentVolumeClaim:
|
|
claimName: portfolio-pvc
|
|
imagePullSecrets:
|
|
- name: chaoticlogic-registry-login
|