58 lines
1.3 KiB
Smarty
Executable File
58 lines
1.3 KiB
Smarty
Executable File
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: backend
|
|
namespace: sk1
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: backend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: backend
|
|
spec:
|
|
containers:
|
|
- name: backend
|
|
image: gcr.io/${PROJECT}/backend:latest
|
|
resources:
|
|
limits:
|
|
cpu: "500m"
|
|
memory: "512Mi"
|
|
requests:
|
|
cpu: "200m"
|
|
memory: "256Mi"
|
|
ports:
|
|
- containerPort: 4000
|
|
env:
|
|
- name: PORT
|
|
value: "4000"
|
|
- name: MONGO_URI
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mongodb-secret
|
|
key: MONGO_URI
|
|
- name: JWT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mongodb-secret
|
|
key: JWT_SECRET
|
|
- name: GOOGLE_PLACES_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mongodb-secret
|
|
key: GOOGLE_PLACES_API_KEY
|
|
# Change probes to use /api endpoint which exists
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api
|
|
port: 4000
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 20
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api
|
|
port: 4000
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 10 |