diff --git a/openshift/dotCMS-OpenShift.yaml b/openshift/dotCMS-OpenShift.yaml new file mode 100644 index 0000000..e337778 --- /dev/null +++ b/openshift/dotCMS-OpenShift.yaml @@ -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: + 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 \ No newline at end of file