osl-incubator / sugar

Simplify the usage of containers
https://osl-incubator.github.io/sugar/
BSD 3-Clause "New" or "Revised" License
7 stars 8 forks source link

Create dependencies for groups and services #40

Open xmnlab opened 1 year ago

xmnlab commented 1 year ago

Example:

version: 1.0.0
compose-app: docker-compose
service-groups:
  - name: group1
    project-name: project1  # optional
    compose-path: containers/tests/group1/compose.yaml
    env-file: .env
    services:
      default: service1-1,service1-3
      list:
        - name: service1-1
          depends_on:
            - dep1
        - name: service1-2
        - name: service1-3
    dependencies:
      - name: dep1
        source:
          # local:
          #   wdir: /tmp
          #   path: containers/.containers-sugar.yaml
          # or
          # repo:
          #   url: https://github.com/alertadengue/copernicus
          #   path: .containers-sugar.yaml
          #   branch: ...
          #   commit: ...
        env-file: .env
        services:
          - group1.service-dep1.1
          - group2.service-dep1.2

  - name: group2
    project-name: null  # optional
    compose-path: containers/tests/group2/compose.yaml
    env-file: .env
    services:
      default: null
      list:
        - name: service2-1
        - name: service2-2

  - name: group-mix
    project-name: null  # optional
    compose-path:
      - containers/tests/group1/compose.yaml
      - containers/tests/group2/compose.yaml
    env-file: .env
    services:
      default: null
      list:
        - name: service1-1
        - name: service1-2
        - name: service2-1
        - name: service2-2