Service
A service can be a part of one or more workflows. When a workflow is run, only services that are a part of the workflow will be started.
Properties
Containers
A service is comprised of the following containers:
init
The init container is the first container that gets run when a service starts. If it fails, the configure container will not run. The first script that runs is the maintained .init
script which then runs the customizable init
script. Only the .init
script will be overriten when the application is re-scaffolded.
configure
The init container is the second container that gets run when a service starts. If it fails, the proxy container will not run. The first script that runs is the maintained .configure
script which then runs the customizable configure
script. Only the .configure
script will be overriten when the application is re-scaffolded. The purpose of this step is to configure Stoobly proxy settings.
proxy
This container only runs if a hostname
property is configured
The proxy container is the last container that gets run. It provides a lifecycle_hooks.py
script that enables customization of requests and response at different points of their lifecycles. To learn more:
It also provides a fixtures.yml
file that enables mapping URL's to static responses stored in files.
custom
Custom containers can be defined in the provided docker-compose.yml
.
The profiles
and networks
properties need to be set accordingly
Core Services
Core services are services maintained by Stoobly and maintains the following start order:
build
Is the first service to be started and runs the snapshot apply command to build mocks.
gateway
Is responsible for routing requests from the host to the appropriate custom service.
stoobly-ui
Provides a UI on http://localhost:4200 to manage mocks and proxy configuration.
entrypoint
Is the last service to be started and has the purpose of being extended in the provided docker-compose.yml
with custom functionality.
Get Started
Last updated
Was this helpful?