Last active
January 1, 2024 11:24
-
-
Save dipspb/a08258117f5bbc4fc14712ac2f98f66b to your computer and use it in GitHub Desktop.
Revisions
-
dipspb revised this gist
Oct 13, 2023 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ x-default-environment: &x-default-environment HELLO: Hi! I am SVC_NAME: service-X-DEFAULT # sequence merge example, there are no "- " prefixes x-default-volumes: &x-default-volumes |- ./a:/tmp/A ./b:/tmp/B @@ -66,4 +66,3 @@ services: # sequence merge example - *x-default-volumes - ./c:/tmp/C -
dipspb created this gist
Oct 13, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,69 @@ version: "3.4" # Prepare files for this example: # mkdir -p ./a ./b ./c && touch a/a.txt b/b.txt c/c.txt x-default-image: &x-default-image image: ubuntu x-default-cmd: &x-default-cmd command: bash -c "echo $${HELLO} $${SVC_NAME} ; ls -al /tmp/*" # map merge example x-default-environment: &x-default-environment HELLO: Hi! I am SVC_NAME: service-X-DEFAULT # sequence merge example x-default-volumes: &x-default-volumes |- ./a:/tmp/A ./b:/tmp/B services: service-A: <<: - *x-default-image - *x-default-cmd profiles: - a - both environment: # map merge example <<: *x-default-environment SVC_NAME: service-A volumes: # sequence merge example - *x-default-volumes service-B: <<: [*x-default-image, *x-default-cmd] profiles: - b - both environment: <<: *x-default-environment SVC_NAME: service-B volumes: # sequence merge example - *x-default-volumes depends_on: service-A: condition: service_completed_successfully links: - service-A service-C: <<: [*x-default-image, *x-default-cmd] profiles: - a - c environment: <<: *x-default-environment SVC_NAME: service-C volumes: # sequence merge example - *x-default-volumes - ./c:/tmp/C