Adds polis app.
This commit is contained in:
101
polis/versions/dev/deployment-server.yaml
Normal file
101
polis/versions/dev/deployment-server.yaml
Normal file
@@ -0,0 +1,101 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: polis-server
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
component: server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: server
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: false
|
||||
runAsUser: 0
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: polis-server
|
||||
image: compdemocracy/polis-server:dev
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 5000
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: NODE_ENV
|
||||
value: production
|
||||
- name: DEV_MODE
|
||||
value: "false"
|
||||
- name: MATH_ENV
|
||||
value: prod
|
||||
- name: API_SERVER_PORT
|
||||
value: "5000"
|
||||
- name: API_PROD_HOSTNAME
|
||||
value: {{ .domain }}
|
||||
- name: DOMAIN_OVERRIDE
|
||||
value: {{ .domain }}
|
||||
- name: STATIC_FILES_HOST
|
||||
value: {{ .domain }}
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: polis-secrets
|
||||
key: dbUrl
|
||||
- name: POLIS_FROM_ADDRESS
|
||||
value: {{ .adminEmail }}
|
||||
- name: ADMIN_EMAILS
|
||||
value: '["{{ .adminEmail }}"]'
|
||||
- name: LOGIN_CODE_PEPPER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: polis-secrets
|
||||
key: loginCodePepper
|
||||
- name: JWT_PRIVATE_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: polis-secrets
|
||||
key: jwtPrivateKey
|
||||
- name: JWT_PUBLIC_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: polis-secrets
|
||||
key: jwtPublicKey
|
||||
- name: POLIS_JWT_ISSUER
|
||||
value: https://{{ .domain }}/
|
||||
- name: POLIS_JWT_AUDIENCE
|
||||
value: participants
|
||||
- name: AUTH_ISSUER
|
||||
value: https://{{ .domain }}/
|
||||
- name: AUTH_AUDIENCE
|
||||
value: users
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
ephemeral-storage: 1Gi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 256Mi
|
||||
ephemeral-storage: 50Mi
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: false
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/v3/testConnection
|
||||
port: 5000
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 5
|
||||
periodSeconds: 30
|
||||
failureThreshold: 6
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /api/v3/testConnection
|
||||
port: 5000
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 5
|
||||
periodSeconds: 15
|
||||
failureThreshold: 3
|
||||
restartPolicy: Always
|
||||
Reference in New Issue
Block a user