apiVersion: v1
kind: Pod
metadata:
  name: owncloud
  labels:
    name: owncloud
spec:
  containers:
    - name: owncloud
      image: sameersbn/owncloud:10.0.10-0
      args: ["app:owncloud"]
      env:
        - name: TZ
          value: Asia/Kolkata
        - name: DEBUG
          value: "false"

        - name: OWNCLOUD_URL
          value: http://cloud.example.com

        - name: OWNCLOUD_ADMIN_USER
          value: admin
        - name: OWNCLOUD_ADMIN_PASSWORD
          value: password

        - name: OWNCLOUD_UPLOAD_MAX_FILESIZE
          value: 4G
        - name: OWNCLOUD_MAX_FILE_UPLOADS
          value: "20"

        - name: DB_TYPE
          value: pgsql
        - name: DB_HOST
          value: postgresql
        - name: DB_PORT
          value: "5432"
        - name: DB_USER
          value: owncloud
        - name: DB_PASS
          value: password
        - name: DB_NAME
          value: owncloud_db

      ports:
        - name: php-fpm
          containerPort: 9000
          protocol: TCP
      volumeMounts:
        - mountPath: /var/lib/owncloud
          name: data
      livenessProbe:
        tcpSocket:
          port: 9000
        initialDelaySeconds: 5
        timeoutSeconds: 1
  volumes:
    - name: data
      emptyDir: {}
