chore: migrate from docker compose to kubernetes deployment
- 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)
This commit is contained in:
80
k8s/deployment.yaml
Normal file
80
k8s/deployment.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
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
|
||||
Reference in New Issue
Block a user