From 6921533ab3cb09b629b77ef5a531d59cbba5c4d9 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sun, 15 Sep 2024 16:11:14 +0200 Subject: init repo --- yaml/postgres-deployment.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 yaml/postgres-deployment.yaml (limited to 'yaml/postgres-deployment.yaml') diff --git a/yaml/postgres-deployment.yaml b/yaml/postgres-deployment.yaml new file mode 100644 index 0000000..fd9945f --- /dev/null +++ b/yaml/postgres-deployment.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-71-g8e6c