diff options
Diffstat (limited to 'yaml/deployments')
-rw-r--r-- | yaml/deployments/cas.yaml | 52 | ||||
-rw-r--r-- | yaml/deployments/postgres.yaml | 38 |
2 files changed, 90 insertions, 0 deletions
diff --git a/yaml/deployments/cas.yaml b/yaml/deployments/cas.yaml new file mode 100644 index 0000000..fc0289a --- /dev/null +++ b/yaml/deployments/cas.yaml @@ -0,0 +1,52 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cas-deployment +spec: + replicas: 1 + selector: + matchLabels: + app: cas + template: + metadata: + labels: + app: cas + spec: + containers: + - name: cas + image: ghcr.io/cas-4/backend:latest + imagePullPolicy: Always + env: + - name: RUST_LOG + valueFrom: + configMapKeyRef: + name: cas-config + key: RUST_LOG + - name: DATABASE_URL + valueFrom: + configMapKeyRef: + name: cas-config + key: DATABASE_URL + - name: JWT_SECRET + valueFrom: + secretKeyRef: + name: cas-secret + key: JWT_SECRET + - name: EXPO_ACCESS_TOKEN + valueFrom: + secretKeyRef: + name: cas-secret + key: EXPO_ACCESS_TOKEN + - name: UNREALSPEECH_TOKEN + valueFrom: + secretKeyRef: + name: cas-secret + key: UNREALSPEECH_TOKEN + - name: ALLOWED_HOST + valueFrom: + configMapKeyRef: + name: cas-config + key: ALLOWED_HOST + ports: + - containerPort: 8000 + restartPolicy: Always diff --git a/yaml/deployments/postgres.yaml b/yaml/deployments/postgres.yaml new file mode 100644 index 0000000..fd9945f --- /dev/null +++ b/yaml/deployments/postgres.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: postgres-deployment +spec: + replicas: 1 + selector: + matchLabels: + app: postgres + template: + metadata: + labels: + app: postgres + spec: + containers: + - name: postgres + image: postgis/postgis:16-3.4 + env: + - name: POSTGRES_USER + value: "postgres" + - name: POSTGRES_PASSWORD + value: "password" + - name: POSTGRES_DB + value: "gis" + ports: + - containerPort: 5432 + volumeMounts: + - mountPath: /var/lib/postgresql/data + name: pgdata + - mountPath: /docker-entrypoint-initdb.d + name: schema + volumes: + - name: pgdata + persistentVolumeClaim: + claimName: pgdata-pvc + - name: schema + hostPath: + path: ${PGDATA} |