apiVersion: apps.libre.sh/v1alpha1
kind: Nextcloud
metadata:
  name: nextcloud-sample
spec:
  # Add fields here
  version: "16"
  jobs:
    install:
      command: 
        - sh 
        - -c 
        - sleep 10
  app:
    deployment:
      replicas: 2
      command: 
        - php-fpm
  web:
    deployment:
      command: 
        - php-fpm
    network:
      host: pg-cloud-beta-liiib-re
  settings:
    app:
      createOptions:
        generate: envFile
      redis:
        host:
          value: "{{ .settings.app.INSTANCE_ID }}"
          generate: template
      database:
      #  database:
      #  host:
      #    value: "foo"
        database:
          value: "nextcloud-prod"
      #  port:
      #  type:
      objectStore:
        bucket:
          value: cloud-beta-liiib-re
        host:
          value: "https://s3.standard.indie.host"
        accessKeyID:
          ref: bucket-creds
          fromKey: AWS_ACCESS_KEY_ID
          type: secret
        secretAccessKey:
          ref: bucket-creds
          fromKey: AWS_SECRET_ACCESS_KEY
          type: secret
