Adding Custom Container Services

The following are examples of what custom container services can be used for:

  • When recording requests from a service, a local instance may be needed. This local instance of the service can be added here

  • When testing, a custom container can be used to trigger the tests after all the services have initialized. An entrypoint service is provided for this purpose

To add a custom container service:

  1. Each workflow provides a docker-compose.yml for the purpose of adding custom container services. For example:

$ cat .stoobly/docker/<SERVICE-NAME>/<WORKFLOW-NAME>/docker-compose.yml
networks:
  gateway:
    external: true
    name: ${APP_NETWORK}
  sampleapis:
    name: sampleapis
services: {}
  1. Custom services should be added under the services property. A custom services include under profiles the name of the workflow. For example, if the current workflow is record, then:

$ cat .stoobly/docker/<SERVICE-NAME>/<WORKFLOW-NAME>/docker-compose.yml
networks:
  gateway:
    external: true
    name: ${APP_NETWORK}
  sampleapis:
    name: sampleapis
services: 
  helloWorld:
    image: hello-world
    profiles:
      - record

Last updated