backend/deploy/1-deployment.yaml

95 lines
2.5 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: noded-backend
namespace: noded
spec:
selector:
matchLabels:
app: noded-backend
template:
metadata:
name: noded-backend
labels:
app: noded-backend
spec:
volumes:
- name: noded-secrets-vol
secret:
secretName: noded-secrets
optional: false
containers:
- name: noded-web
image: ${DOCKER_REGISTRY}/noded/backend
imagePullPolicy: Always
volumeMounts:
- mountPath: /secrets
readOnly: true
name: noded-secrets-vol
env:
- name: APP_URL
value: "https://${NODED_DOMAIN}/"
- name: DATABASE_HOST
value: '${NODED_DATABASE_HOST}'
- name: DATABASE_NAME
value: '${NODED_DATABASE_NAME}'
- name: SECRET
valueFrom:
secretKeyRef:
key: SECRET
name: noded-secrets
optional: false
- name: AUTH_COREID_CLIENT_ID
valueFrom:
secretKeyRef:
key: AUTH_COREID_CLIENT_ID
name: noded-secrets
optional: false
- name: AUTH_COREID_CLIENT_SECRET
valueFrom:
secretKeyRef:
key: AUTH_COREID_CLIENT_SECRET
name: noded-secrets
optional: false
- name: APP_NAME
value: "Noded"
- name: SERVER_PORT
value: '8000'
- name: DATABASE_PORT
value: '27017'
- name: DATABASE_AUTH
value: 'false'
- name: ENVIRONMENT
value: production
- name: SSL_ENABLE
value: 'false'
- name: AUTH_FLITTER_ENABLE
value: 'true'
- name: AUTH_COREID_ENABLE
value: 'true'
- name: SESSION_MAX_AGE
value: '2678400000'
- name: NODE_TLS_REJECT_UNAUTHORIZED
value: '0'
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: noded-frontend
namespace: noded
spec:
selector:
matchLabels:
app: noded-frontend
template:
metadata:
name: noded-frontend
labels:
app: noded-frontend
spec:
containers:
- name: noded-web
image: ${DOCKER_REGISTRY}/noded/frontend
imagePullPolicy: Always