diff --git a/README.md b/README.md index a2d1a422..24e0c7e5 100644 --- a/README.md +++ b/README.md @@ -203,11 +203,11 @@ To add a new service, with advanced configuration (see the [backend](./services/ 1. follow the steps from the [basic section](#basic) 2. eventually, include any service, in the service-specific folder which is specific to the service and not shared by other, more general services, e.g. [here](./services/backend/services/). This folder should also include different versions of the same service, e.g. v3 and v4 [here](./services/backend/services/) 3. eventually, if the service supports [ENVs](#docker-compose-env-variables), leverage the [include override](https://docs.docker.com/compose/multiple-compose-files/include/#include-and-overrides) feature from docker compose. For this: - 1. create a `compose.base.yaml` file, e.g. [here](./services/backend/services/v4/compose.base.yaml), which should contain the `base` configuration, i.e. the one where all ENVs are unset, i.e. the features are disabled - 2. create the ENV-specific (e.g. `ELASTIC_ENABLED`) `compose..yaml` file, e.g. [backend v4 compose.elastic.yaml](./services/backend/services/v4/compose.elastic.yaml), with the additional/override config, specific to the enabled feature - 3. create a symlink from [.empty.yaml](./services/.empty.yaml) to each `.compose..yaml`, e.g. [here](./services/backend/services/v4/.compose.elastic.yaml). This is used whenever the `ENV` is unset, as described in the next step - 4. use `compose.yaml` to merge the `compose*.yaml` files together, making sure to default to `.compose..yaml` whenever the `ENV` is not set. See an example [here](./services/backend/services/v4/compose.yaml) - 5. if the service is another version of an existing one, e.g. v3 and v4 versions of the `backend` service, add the selective include in the parent compose.yaml, e.g. [here](./services/backend/compose.yaml) + 1. create a `compose.base.yaml` file, e.g. [here](./services/backend/services/v4/compose.base.yaml), which should contain the `base` configuration, i.e. the one where all ENVs are unset, i.e. the features are disabled + 2. create the ENV-specific (e.g. `ELASTIC_ENABLED`) `compose..yaml` file, e.g. [backend v4 compose.elastic.yaml](./services/backend/services/v4/compose.elastic.yaml), with the additional/override config, specific to the enabled feature + 3. create a symlink from [.empty.yaml](./services/.empty.yaml) to each `.compose..yaml`, e.g. [here](./services/backend/services/v4/.compose.elastic.yaml). This is used whenever the `ENV` is unset, as described in the next step + 4. use `compose.yaml` to merge the `compose*.yaml` files together, making sure to default to `.compose..yaml` whenever the `ENV` is not set. See an example [here](./services/backend/services/v4/compose.yaml) + 5. if the service is another version of an existing one, e.g. v3 and v4 versions of the `backend` service, add the selective include in the parent compose.yaml, e.g. [here](./services/backend/compose.yaml) 4. eventually, add entrypoints for init logics, as described [here](#if-the-service-does-not-support-entrypoints-yet-one-needs-to), e.g. like [here](./services/backend/services/v4/compose.base.yaml)