apiVersion: v1
data:
  init.sh: >
    #!/bin/sh

    if [ ! -f $NUXEO_DATA/instance.clid -a -f
    /opt/nuxeo/connect/connect.properties ]; then
      . /opt/nuxeo/connect/connect.properties
      if [ -n "$NUXEO_CONNECT_USERNAME" -a -n "$NUXEO_CONNECT_PASSWORD" -a -n "$NUXEO_STUDIO_PROJECT" ]; then
        echo "---> Registering instance on connect"
        nuxeoctl register $NUXEO_CONNECT_USERNAME $NUXEO_STUDIO_PROJECT dev openshift $NUXEO_CONNECT_PASSWORD
      fi
    fi
  nuxeo.conf: |
    # Additional nuxeo.conf parameters
    |-
    ##Mongo
    nuxeo.mongodb.server=mongodb://nuxeo-backings-mongo-0.nuxeo-backings-mongo:27017
    nuxeo.mongodb.dbname=nuxeo
    nuxeo.templates=default,mongodb,zapier
kind: ConfigMap
metadata:
  labels:
    app: nuxeo-zapier
    release: nuxeo
    role: config
  name: nuxeo-conf
