telega-compose
This is a wrapper on docker-compose, which extends compose file syntax to keep several configurations (states) of your services in one file, with similar to docker-compose file syntax using native YAML anchors and aliases.
How it works:
Render in-memory docker-compose file for required state from states file.
Call docker-compose app with rendered file (state) and apply required docker-compose command on it.
States file reference:
It’s a YAML file with two required sections: compose and states.
Section compose is regular docker-compose config excluding services section:
compose:
version: '3.4'
configs:
my_config:
file: ./my_config.txt
my_other_config:
external: true
secrets:
my_secret:
file: ./my_secret.txt
my_other_secret:
external: true
volumes:
data:
media:
Section states is a list of states with description of services section for each state:
states:
live:
services:
backend: *backend_service
database: *database_service
webserver: *webserver_service
You can describe service in separate section or inside states section. Also, you can inherit early described service and override some parameters in place:
states:
local:
services:
database: &database_local_service
<<: *database_service
ports:
- "127.0.0.1:5432:5432"
The rest of the sections you can use for you own purposes. For example to configure logging for all services:
---
compose:
...
config:
logging: &logging_config
driver: "json-file"
options:
max-size: 50m
components:
backend: &backend_service
...
logging: *logging_config
database: &database_service
...
logging: *logging_config
webserver: &webserver_service
...
logging: *logging_config
states:
live:
services:
backend: *backend_service
database: *database_service
webserver: *webserver_service
CLI usage:
tcompose [-h] [-f FILE] state [docker-compose parameters]
Positional arguments:
state - state to render docker-compose file
docker-compose parameters - any command and its parameters accepted by docker-compose except parameter for docker-compose file (-f, –file)
Optional arguments:
-h, –help - to show help message
-f FILE, –file FILE - path to states file, by default: states.yml
Examples:
tcompose local_dev config
tcompose live -f /path/to/my-custom-states.yml up -d
tcompose qa -f /path/to/states.yml --project-name acme up
Metadata
Release files for telega-compose 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| telega-compose-0.0.2.tar.gz | 4.9 kB | Without provenance | Details for telega-compose-0.0.2.tar.gz |
Release files / telega-compose-0.0.2.tar.gz
| Download URL | telega-compose-0.0.2.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb28884cf89a6f119df88a39bd9cfb93d970dc6849019b5d8df1f5d0b46c263a
|
|
BLAKE2b-256 checksum How to use checksums |
522d62f5a977232cd10bcf0cedf2c471eb72da4647d20479914828b01108a5fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for telega-compose 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.