Deploy build from separate files

Splitting the deploy.json configuration file

For the convenience of organizing and increasing the readability of the application configuration, deploy.json has the ability to split this file into several separate configuration files.

There can be any separation options: you can take out only the configuration of application modules from it or describe each deploy object in a separate file.

For configuration, in the deploy folder of the application, you need to place arbitrary files with the extensions .json or .yml.

To work correctly in them, it is necessary to preserve the original structure of deploy.json: objects must be nested in the same order as in the source file. With the exception of modules in the application.

For example, if the globals.jobs.ticketClose.di object was defined in deploy.json, then to transfer the di object to a separate file, the structure of these nested objects must be reproduced in this file:

---
globals:
  jobs:
    ticketClose:
      di:
        ticketCloser:
          executable: applications/khv-ticket-discount/lib/overnightTicketClose
          options:
            dataRepo: ion://dataRepo
            log: ion://sysLog
            workflows: ion://workflows

Module configuration files

In the case of module configs, they can also be

  1. Placed in the directories deploy/modules/<module name>/
  2. Put the entire config for the module in the deploy/modules/<module name>.yaml (.json) file

The description begins with the root of the module (not the application):

---
globals:
  navigation:
    namespaces:
      khv-ticket-discount: Льготные билеты
  eagerLoading:
    "*":
      applicant@khv-ticket-discount:
        item:
          - documents.vidDocument
      flight@khv-ticket-discount:
        list:
          - route.pointDeparture
          - route.pointArrival
  listSearchOptions:
    ticketYear@khv-ticket-discount:
      "*":
        searchBy:
          - flight
          - person
          - numberTicket
          - area
        refDepth: 3
     flight@khv-ticket-discount:
      "*":
        searchBy:
          - route
          - number
        refDepth: 3
  di:
    pmListToDocx:
      module: modules/registry/export/listToDocx
       initMethod: init
      initLevel: 0
      options:
        tplDir: applications/khv-ticket-discount/export/list
        log: ion://sysLog
        injectors:
          - ion://monthTicketStatsInjector
...