This repository has been archived by the owner on Jan 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #9 added yaml file to deploy dotcms along with postgreSQL
- Loading branch information
Santosh
committed
Jul 12, 2019
1 parent
a77ca91
commit f7160ea
Showing
1 changed file
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
apiVersion: v1 | ||
kind: List | ||
items: | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: cms-shared-pvc | ||
spec: | ||
accessModes: | ||
- ReadWriteMany | ||
storageClassName: "" | ||
resources: | ||
requests: | ||
storage: 5Gi | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: dbdata-pvc | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: "" | ||
resources: | ||
requests: | ||
storage: 10Gi | ||
- apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: postgres | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: postgres | ||
template: | ||
metadata: | ||
labels: | ||
app: postgres | ||
spec: | ||
volumes: | ||
- name: dbdata | ||
persistentVolumeClaim: | ||
claimName: dbdata-pvc | ||
containers: | ||
- name: postgres | ||
image: bitnami/postgres:9.6 | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 5432 | ||
protocol: TCP | ||
env: | ||
- name: POSTGRESQL_USERNAME | ||
value: dotcmsdbuser | ||
- name: POSTGRESQL_PASSWORD | ||
value: password | ||
- name: POSTGRESQL_DATABASE | ||
value: dotcms | ||
volumeMounts: | ||
- name: dbdata | ||
mountPath: /data/pg | ||
restartPolicy: Always | ||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: db-svc | ||
spec: | ||
ports: | ||
- port: 5432 | ||
selector: | ||
app: postgres | ||
type: ClusterIP | ||
- apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: dotcms | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: dotcms | ||
template: | ||
metadata: | ||
labels: | ||
app: dotcms | ||
spec: | ||
volumes: | ||
- name: cmsshared | ||
persistentVolumeClaim: | ||
claimName: cms-shared-pvc | ||
containers: | ||
- name: dotcms | ||
image: <dotcms-image> | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 4000 | ||
protocol: TCP | ||
- containerPort: 8000 | ||
protocol: TCP | ||
- containerPort: 8080 | ||
protocol: TCP | ||
- containerPort: 8081 | ||
protocol: TCP | ||
- containerPort: 8082 | ||
protocol: TCP | ||
env: | ||
- name: CMS_HEAP_SIZE | ||
value: 2G | ||
- name: CMS_JAVA_OPTS | ||
value: -XX:+PrintFlagsFinal | ||
- name: PROVIDER_DB_DNSNAME | ||
value: db-svc | ||
volumeMounts: | ||
- name: cmsshared | ||
mountPath: /data/shared | ||
restartPolicy: Always | ||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: dotcms | ||
spec: | ||
ports: | ||
- name: dotcms | ||
port: 8080 | ||
protocol: TCP | ||
selector: | ||
app: dotcms | ||
type: ClusterIP |