mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-12 04:08:29 +01:00
66 lines
1.6 KiB
YAML
66 lines
1.6 KiB
YAML
# Kubernetes
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: "${HOOGLE_DEPLOYMENT_NAME}"
|
|
spec:
|
|
replicas: 2
|
|
minReadySeconds: 5
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: "${HOOGLE_DEPLOYMENT_APP}"
|
|
spec:
|
|
containers:
|
|
- name: stackage-server-hoogle
|
|
image: "${DEPLOYMENT_IMAGE}"
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- name: http
|
|
containerPort: 3000
|
|
command: ["stackage-server"]
|
|
workingDir: /app
|
|
env:
|
|
- name: APPROOT
|
|
value: "${APPROOT}"
|
|
- name: PGSTRING
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: "${DEPLOYMENT_NAME}"
|
|
key: PGCONN
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 3000
|
|
httpHeaders:
|
|
# Works around stackage-server's `forceSSL` redirect
|
|
- name: HTTPS
|
|
value: "on"
|
|
initialDelaySeconds: 5
|
|
timeoutSeconds: 1
|
|
periodSeconds: 5
|
|
successThreshold: 1
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 3000
|
|
httpHeaders:
|
|
# Works around stackage-server's `forceSSL` redirect
|
|
- name: HTTPS
|
|
value: "on"
|
|
initialDelaySeconds: 120
|
|
timeoutSeconds: 1
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 1.0Gi
|
|
limits:
|
|
cpu: 150m
|
|
memory: 1.5Gi
|
|
imagePullSecrets:
|
|
- name: registry-key
|