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/postgres.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 yaml/deployments/postgres.yaml (limited to 'yaml/deployments/postgres.yaml') 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