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

Add Dockerfile, gitlab-ci

parent 220b6b75
No related branches found
No related tags found
1 merge request!1Update with a working example
......@@ -27,49 +27,49 @@ kind: Deployment
metadata:
name: postgresql
labels:
app: postgresql
app: postgresql
spec:
strategy:
type: Recreate
type: Recreate
template:
metadata:
metadata:
labels:
app: postgresql
tier: postgreSQL
spec:
containers:
- name: postgresql
image: postgres:9.6.2-alpine
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:
app: postgresql
tier: postgreSQL
spec:
containers:
- name: postgresql
image: postgres:9.6.2-alpine
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
persistentVolumeClaim:
claimName: postgres-claim
- name: postgresql-credentials
secret:
secretName: 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