##
## Links deployable services
##

## Syntax:

## <SERVICE>:
##   charm: <CHARM>         # optional: defaults to charm of same name
##   link:
##     <RELATION>: <CHARM>  # or:
##     <RELATION>:
##       <SERVICE>:
##         <YML RELATION'S CONFIGURATION>
##

## launching up a SERVICE, will spawn required SERVICES for given linked RELATIONS.
## if SERVICE has no definition here AND has a charm with no requirements, it'll be
## spawned on itself as if a unwritten empty SERVICE definition existed:
##
##   <SERVICE>:
##


enquetes:
  charm: enquetes
  link:
    publish-dir:
      apache:
        source: git:$MAIN_GIT/enquete
        branch: master
        location: /opt/apps/limesurvey
        data_dirs:
          - tmp
          - upload
        domain: enquetes.$MAIN_DOMAIN
    mysql-database:
      mysql:
        user: lmenquete
        dbname: lmenquete

fo:
  charm: formanoo_nfo
  link:
    publish-dir:
      apache:
        source: git:$MAIN_GIT/formanoo_nfo
        branch: master
        location: /opt/apps/formanoo_nfo
        data_dirs:
          - assets/eclasseurs
          - assets/mpdf/tmp
          - api/v1/mpdf/tmp
          - users
        domain: www.$MAIN_DOMAIN
    postgres-database:
      postgres:
        user: formanoo_nfo
        dbname: formanoo_nfo

bo:
  charm: odoo
  link:
    pg-database:
      postgres:
        user: odoo
        dbname: extranet
    web-proxy: apache
    birt-reports: birt

monitor:
  charm: facette
  link:
    web-proxy:
      domain: monitor.${MAIN_DOMAIN}