Skip to main content

Docoseco

Docker-compose secrets and configs.

Automatize management of docker confgs and secrets.

Usage

docoseco [CONFIG_ROOT_DIR] < docker-compose.template.yaml > docker-compose.yaml

  CONFIG_ROOT_DIR  Root directory for file search (default: .)

It reads docker-compose yaml from stdin, updates all config and secret names with corresponding file content hashsums and writes result to stdout.

Rationale

Docker-compose configs and secrets are immutable by design. So, when config or secret is created from file via docker stack deploy, it's impossible to update the file and deploy in the same way again. For example:

# docker-compose.yaml
version: "3.8"
services:
  redis:
    image: redis:latest
    configs:
      - source: my_config
        target: /redis_config
configs:
  my_config:
    file: ./my_config.txt

If, after the initial deployment, my_config.txt is changed, the next deployment attempt will fail.

The common workaround is creating a new config, when a source file changes. This is done by changing config name:

# docker-compose.yaml
...
configs:
  my_config:
    name: my_config-2     # Changing name creates new docker config
    file: ./my_config.txt # This file was changed

To avoid manual management of config names, numerical suffix might be replaced by a file content hashsum, which can be automatically calculated.

# docker-compose.yaml
...
configs:
  my_config:
    name: my_config-bee414b86ee02806b17104813d44eea4 # Auto-generated config name
    file: ./my_config.txt # This file was changed

Metadata

Release files for docoseco 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docoseco 1.0.0
File Size Uploaded
docoseco-1.0.0.tar.gz 2.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docoseco 1.0.0
File Interpreter ABI Platform
docoseco-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.2 kB

Release files / docoseco-1.0.0.tar.gz

Download URL docoseco-1.0.0.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
aec7128629ce4924c7a7916dad9727eef82a7c3fdffae930c97f65c0ef233f8e
BLAKE2b-256 checksum
How to use checksums
069921696d3918b2f9799fab7f8b358baae42df7fbf93f9b4327019a739a11c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.8.5 Linux/5.7.11-arch1-1

Release files / docoseco-1.0.0-py3-none-any.whl

Download URL docoseco-1.0.0-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f1a407721e9a79de15ee590145352deb22af7b59d4301f84b1b816329da2923
BLAKE2b-256 checksum
How to use checksums
1a5d8a61d91687b6c1503866c1f86250908502843c85eb17a3c425baedbb3bd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.8.5 Linux/5.7.11-arch1-1

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page