Skip to content

Docker secrets as templates - #80

Open
hazzuk wants to merge 5 commits into
custom-stacksfrom
secrets-templates
Open

Docker secrets as templates#80
hazzuk wants to merge 5 commits into
custom-stacksfrom
secrets-templates

Conversation

@hazzuk

@hazzuk hazzuk commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Description

Docker secrets are now defined using templates (instead of convoluted defaults variables).

See hazzuk/karo-custom#23 for a reference implementation.

Changes

  • The 'deploy' tasks have been moved to up.yml. Simplifying the role, and allowing for secrets to be templated.
  • New karo_compose_secrets_path variable, set dynamically at runtime per stack.
  • Secrets created using templates, and each end of file newline is automatically removed.

Notes

Secrets as templates have some large advantages:

  • The compose. dictionary variable can now be used to reference a stack variable.
  • Avoids the need for long-winded variable definitions.
  • Much more visually representative of how secrets are passed to compose stacks.
  • Secrets can now be left undefined, and instead rely on the stack defaults variables.

Checklist

  • Written documentation
  • [n/a] Linked relevant issues

hazzuk added 5 commits July 31, 2026 06:22
Will need to handle templates and secrets inside the same task file.
Required as each stack will now need a unique secrets directory created.
Otherwise causes issues with services like Pocket-ID. Where the file is treated as binary, so any CR/LF line terminator is treated as part of the secret.
@hazzuk hazzuk added the Kind/Feature New functionality label Aug 2, 2026
@hazzuk
hazzuk requested a review from mosslocker August 3, 2026 01:12
@hazzuk

hazzuk commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

Secrets documentation changes complete: https://docs.karolabs.dev/dev/compose/secrets/

@mosslocker changes have been made since yesterday, which should further help to clarify how secrets work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Kind/Feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant