98 lines
2.2 KiB
YAML
98 lines
2.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: airgate-backend
|
|
labels:
|
|
app: airgate-backend
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: airgate-backend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: airgate-backend
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: swr-secret
|
|
containers:
|
|
- name: airgate-backend
|
|
image: ${CI_REGISTRY_IMAGE}/airgate-backend:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 8100
|
|
env:
|
|
- name: DJANGO_DEBUG
|
|
value: "False"
|
|
- name: DJANGO_ALLOWED_HOSTS
|
|
value: "*"
|
|
- name: DJANGO_SECRET_KEY
|
|
value: "HYsUppcrbCq05fEMzXfokwC8ge9CF3mV7auoSqlCbCakwC8t7lVrYG_pfixA6CHrCJc"
|
|
- name: DB_DIR
|
|
value: "/app/data"
|
|
# CORS
|
|
- name: CORS_ALLOWED_ORIGINS
|
|
value: "https://airgate.airlabs.art"
|
|
- name: AIRGATE_ENCRYPTION_KEY
|
|
value: "8By6udk4wn4VUQeHl_zvr8l6ZBEz77HKs_JkhwiC7FQ="
|
|
volumeMounts:
|
|
- name: sqlite-data
|
|
mountPath: /app/data
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz/
|
|
port: 8100
|
|
httpHeaders:
|
|
- name: Host
|
|
value: localhost
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz/
|
|
port: 8100
|
|
httpHeaders:
|
|
- name: Host
|
|
value: localhost
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
failureThreshold: 3
|
|
resources:
|
|
requests:
|
|
memory: "256Mi"
|
|
cpu: "250m"
|
|
limits:
|
|
memory: "1024Mi"
|
|
cpu: "1000m"
|
|
volumes:
|
|
- name: sqlite-data
|
|
persistentVolumeClaim:
|
|
claimName: airgate-sqlite-pvc
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: airgate-sqlite-pvc
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: airgate-backend
|
|
spec:
|
|
selector:
|
|
app: airgate-backend
|
|
ports:
|
|
- protocol: TCP
|
|
port: 8100
|
|
targetPort: 8100
|