Skip to content
Snippets Groups Projects
Commit 9b249a07 authored by Thomas  MENARD's avatar Thomas MENARD
Browse files

Add Dockerfile, gitlab-ci

parent 5d27a8cc
No related branches found
No related tags found
1 merge request!1Update with a working example
......@@ -29,47 +29,47 @@ metadata:
labels:
app: postgresql
spec:
strategy:
type: Recreate
template:
metadata:
labels:
app: postgresql
tier: postgreSQL
spec:
containers:
- image: postgres:9.6.2-alpine
name: postgresql
env:
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: postgresql-credentials
key: username
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
name: postgresql-credentials
key: database
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgresql-credentials
key: password
ports:
- containerPort: 5432
name: postgresql
volumeMounts:
- name: postgresql
mountPath: /var/lib/postgresql/data
subPath: data
volumes:
- name: postgresql
persistentVolumeClaim:
claimName: postgres-claim
- name: postgresql-credentials
secret:
secretName: postgresql
strategy:
type: Recreate
template:
metadata:
labels:
app: postgresql
tier: postgreSQL
spec:
containers:
- image: postgres:9.6.2-alpine
name: postgresql
env:
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: postgresql-credentials
key: username
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
name: postgresql-credentials
key: database
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgresql-credentials
key: password
ports:
- containerPort: 5432
name: postgresql
volumeMounts:
- name: postgresql
mountPath: /var/lib/postgresql/data
subPath: data
volumes:
- name: postgresql
persistentVolumeClaim:
claimName: postgres-claim
- name: postgresql-credentials
secret:
secretName: postgresql
---
apiVersion: v1
kind: Service
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment