Skip to content

Instantly share code, notes, and snippets.

@jedahan
Created November 11, 2023 17:25
Show Gist options
  • Save jedahan/0e06d8253698f6f8771a8c18c6faab04 to your computer and use it in GitHub Desktop.
Save jedahan/0e06d8253698f6f8771a8c18c6faab04 to your computer and use it in GitHub Desktop.

Revisions

  1. jedahan created this gist Nov 11, 2023.
    1 change: 1 addition & 0 deletions codename
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    007
    18 changes: 18 additions & 0 deletions compose.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    version: "3.8"

    secrets:
    codename:
    file: codename

    configs:
    greeting:
    file: greeting
    template_driver: golang

    services:
    app:
    image: alpine
    secrets: [ codename ]
    configs: [ greeting ]
    command: [ sh, '-c', "/greeting" ]

    1 change: 1 addition & 0 deletions greeting
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    echo {{ secret "codename" }}
    1 change: 1 addition & 0 deletions readme
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    this shows how the template_driver option in a compose file fails silently