From 78925b2a840b4c5059dcf41132bd5f488d7bc3fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89verton=20Inoc=C3=AAncio?= Date: Fri, 23 Feb 2024 08:26:32 -0400 Subject: [PATCH] Update 15-profiles.md (#19400) Replaced foo bar words to improve readability --- content/compose/compose-file/15-profiles.md | 51 +++++++++++---------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/content/compose/compose-file/15-profiles.md b/content/compose/compose-file/15-profiles.md index 6ef27981f0..8ea5225a71 100644 --- a/content/compose/compose-file/15-profiles.md +++ b/content/compose/compose-file/15-profiles.md @@ -24,42 +24,45 @@ Compose returns an error. ```yaml services: - foo: - image: foo - bar: - image: bar + web: + image: web_image + + test_lib: + image: test_lib_image profiles: - test - baz: - image: baz + + coverage_lib: + image: coverage_lib_image depends_on: - - bar + - test_lib profiles: - test - zot: - image: zot + + debug_lib: + image: debug_lib_image depends_on: - - bar + - test_lib profiles: - debug ``` In the above example: -- If the Compose application model is parsed with no profile enabled, it only contains the `foo` service. -- If the profile `test` is enabled, the model contains the services `bar` and `baz`, and service `foo`, which is always enabled. -- If the profile `debug` is enabled, the model contains both `foo` and `zot` services, but not `bar` and `baz`, - and as such the model is invalid regarding the `depends_on` constraint of `zot`. -- If the profiles `debug` and `test` are enabled, the model contains all services; `foo`, `bar`, `baz` and `zot`. -- If Compose is executed with `bar` as the explicit service to run, `bar` and the `test` profile +- If the Compose application model is parsed with no profile enabled, it only contains the `web` service. +- If the profile `test` is enabled, the model contains the services `test_lib` and `coverage_lib`, and service `web`, which is always enabled. +- If the profile `debug` is enabled, the model contains both `web` and `debug_lib` services, but not `test_lib` and `coverage_lib`, + and as such the model is invalid regarding the `depends_on` constraint of `debug_lib`. +- If the profiles `debug` and `test` are enabled, the model contains all services; `web`, `test_lib`, `coverage_lib` and `debug_lib`. +- If Compose is executed with `test_lib` as the explicit service to run, `test_lib` and the `test` profile are active even if `test` profile is not enabled. -- If Compose is executed with `baz` as the explicit service to run, the service `baz` and the - profile `test` are active and `bar` is pulled in by the `depends_on` constraint. -- If Compose is executed with `zot` as the explicit service to run, again the model is - invalid regarding the `depends_on` constraint of `zot`, since `zot` and `bar` have no common `profiles` +- If Compose is executed with `coverage_lib` as the explicit service to run, the service `coverage_lib` and the + profile `test` are active and `test_lib` is pulled in by the `depends_on` constraint. +- If Compose is executed with `debug_lib` as the explicit service to run, again the model is + invalid regarding the `depends_on` constraint of `debug_lib`, since `debug_lib` and `test_lib` have no common `profiles` listed. -- If Compose is executed with `zot` as the explicit service to run and profile `test` is enabled, - profile `debug` is automatically enabled and service `bar` is pulled in as a dependency starting both - services `zot` and `bar`. +- If Compose is executed with `debug_lib` as the explicit service to run and profile `test` is enabled, + profile `debug` is automatically enabled and service `test_lib` is pulled in as a dependency starting both + services `debug_lib` and `test_lib`. -See how you can use `profiles` in [Docker Compose](../profiles.md). \ No newline at end of file +See how you can use `profiles` in [Docker Compose](../profiles.md).