- Replace Docker Compose setup with Kubernetes manifests for deployment - Simplify Dockerfile to use PHP's built-in server instead of nginx+supervisor - Add Makefile with build and deploy commands for local development - Update environment configuration for production deployment - Remove docker-specific configuration files (nginx.conf, supervisord.conf)
81 lines
1.5 KiB
YAML
81 lines
1.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: mkm-admin
|
|
labels:
|
|
app: mkm-admin
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app: mkm-admin
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: mkm-admin
|
|
spec:
|
|
containers:
|
|
- name: mkm-admin
|
|
image: mkm-admin:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 8000
|
|
envFrom:
|
|
- secretRef:
|
|
name: mkm-admin-env
|
|
resources:
|
|
requests:
|
|
cpu: "100m"
|
|
memory: "128Mi"
|
|
limits:
|
|
cpu: "500m"
|
|
memory: "512Mi"
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: mkm-admin-worker
|
|
labels:
|
|
app: mkm-admin
|
|
component: worker
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: mkm-admin
|
|
component: worker
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: mkm-admin
|
|
component: worker
|
|
spec:
|
|
containers:
|
|
- name: worker
|
|
image: mkm-admin:latest
|
|
imagePullPolicy: Always
|
|
command: ["php", "artisan", "horizon"]
|
|
envFrom:
|
|
- secretRef:
|
|
name: mkm-admin-env
|
|
resources:
|
|
requests:
|
|
cpu: "100m"
|
|
memory: "128Mi"
|
|
limits:
|
|
cpu: "500m"
|
|
memory: "512Mi"
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: mkm-admin-service
|
|
spec:
|
|
selector:
|
|
app: mkm-admin
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 8000
|
|
type: ClusterIP
|