From 9e3aff2e2a88f7b95b4c785a1af6084c09621d53 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Wed, 18 Sep 2024 11:20:04 +0200 Subject: Reorganize files in folders --- yaml/deployments/cas.yaml | 52 ++++++++++++++++++++++++++++++++++++++++++ yaml/deployments/postgres.yaml | 38 ++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 yaml/deployments/cas.yaml create mode 100644 yaml/deployments/postgres.yaml (limited to 'yaml/deployments') 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} -- cgit v1.2.3-18-g5258