Automatize management of docker confgs and secrets
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docoseco-1.0.0.tar.gz.
File metadata
- Download URL: docoseco-1.0.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.7.11-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aec7128629ce4924c7a7916dad9727eef82a7c3fdffae930c97f65c0ef233f8e
|
|
| MD5 |
3a200a252ea351c585bb795d154cff51
|
|
| BLAKE2b-256 |
069921696d3918b2f9799fab7f8b358baae42df7fbf93f9b4327019a739a11c6
|
File details
Details for the file docoseco-1.0.0-py3-none-any.whl.
File metadata
- Download URL: docoseco-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.7.11-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f1a407721e9a79de15ee590145352deb22af7b59d4301f84b1b816329da2923
|
|
| MD5 |
0ae0d5c827c1f5d3de93ee311d816cb6
|
|
| BLAKE2b-256 |
1a5d8a61d91687b6c1503866c1f86250908502843c85eb17a3c425baedbb3bd3
|