docker-stack 2.1.0__tar.gz → 2.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {docker_stack-2.1.0 → docker_stack-2.1.1}/PKG-INFO +68 -8
- {docker_stack-2.1.0 → docker_stack-2.1.1}/README.md +66 -6
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack/cli.py +368 -90
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack/helpers.py +2 -6
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack/login.py +17 -1
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack/manager_api.py +192 -7
- docker_stack-2.1.1/docker_stack/shell_auth.py +742 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack.egg-info/PKG-INFO +68 -8
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack.egg-info/SOURCES.txt +3 -1
- {docker_stack-2.1.0 → docker_stack-2.1.1}/setup.py +2 -2
- {docker_stack-2.1.0 → docker_stack-2.1.1}/tests/test_docker_stack.py +285 -29
- docker_stack-2.1.1/tests/test_manager_api.py +462 -0
- docker_stack-2.1.1/tests/test_shell_auth.py +389 -0
- docker_stack-2.1.0/tests/test_manager_api.py +0 -208
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack/__init__.py +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack/command_runner.py +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack/compose.py +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack/docker_objects.py +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack/envsubst.py +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack/envsubst_merge.py +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack/markers.py +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack/merge_conf.py +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack/registry.py +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack/url_parser.py +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack.egg-info/dependency_links.txt +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack.egg-info/entry_points.txt +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack.egg-info/requires.txt +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/docker_stack.egg-info/top_level.txt +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/pyproject.toml +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/setup.cfg +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/tests/test_docker_objects.py +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/tests/test_load_env.py +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/tests/test_login.py +0 -0
- {docker_stack-2.1.0 → docker_stack-2.1.1}/tests/test_node_ls.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: docker-stack
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: CLI for deploying and managing Docker stacks.
|
|
5
5
|
Home-page: https://github.com/mesudip/docker-stack
|
|
6
6
|
Author: Sudip Bhattarai
|
|
@@ -8,7 +8,7 @@ Author-email: sudip@bhattarai.me
|
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
Requires-Dist: PyYAML
|
|
14
14
|
Provides-Extra: dev
|
|
@@ -78,12 +78,49 @@ steps:
|
|
|
78
78
|
- run: docker-stack deploy my-stack docker-compose.yml
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
Use this option when CI can connect directly to the target Docker daemon.
|
|
82
82
|
|
|
83
83
|
#### 2. Docker-Manager
|
|
84
84
|
|
|
85
85
|
Use the bundled action when deploying through Docker-Manager:
|
|
86
86
|
|
|
87
|
+
For a full compose deployment directly from CI, use the action to configure
|
|
88
|
+
Docker-Manager authentication and then run the normal `docker-stack deploy`
|
|
89
|
+
command:
|
|
90
|
+
|
|
91
|
+
```yaml
|
|
92
|
+
permissions:
|
|
93
|
+
contents: read
|
|
94
|
+
id-token: write
|
|
95
|
+
|
|
96
|
+
steps:
|
|
97
|
+
- uses: actions/checkout@v4
|
|
98
|
+
- uses: mesudip/docker-stack@v2
|
|
99
|
+
with:
|
|
100
|
+
manager: https://manager.example.com:2378
|
|
101
|
+
- run: docker-stack deploy --namespace team-a --with-registry-auth my-stack docker-compose.yml
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
You can also deploy the full compose file through action inputs:
|
|
105
|
+
|
|
106
|
+
```yaml
|
|
107
|
+
permissions:
|
|
108
|
+
contents: read
|
|
109
|
+
id-token: write
|
|
110
|
+
|
|
111
|
+
steps:
|
|
112
|
+
- uses: actions/checkout@v4
|
|
113
|
+
- uses: mesudip/docker-stack@v2
|
|
114
|
+
with:
|
|
115
|
+
manager: https://manager.example.com:2378
|
|
116
|
+
stack: my-stack
|
|
117
|
+
compose-file: docker-compose.yml
|
|
118
|
+
namespace: team-a
|
|
119
|
+
with-registry-auth: "true"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
To release new service images without submitting the compose file again:
|
|
123
|
+
|
|
87
124
|
```yaml
|
|
88
125
|
permissions:
|
|
89
126
|
contents: read
|
|
@@ -94,10 +131,31 @@ steps:
|
|
|
94
131
|
- uses: mesudip/docker-stack@v2
|
|
95
132
|
with:
|
|
96
133
|
manager: https://manager.example.com:2378
|
|
97
|
-
|
|
134
|
+
stack: my-stack
|
|
135
|
+
namespace: team-a
|
|
136
|
+
with-registry-auth: "true"
|
|
137
|
+
images: |
|
|
138
|
+
api=ghcr.io/acme/api:${{ github.sha }}
|
|
139
|
+
worker=ghcr.io/acme/worker:${{ github.sha }}
|
|
98
140
|
```
|
|
99
141
|
|
|
100
|
-
|
|
142
|
+
Use a full compose deployment when the workflow owns the complete stack
|
|
143
|
+
definition. Use an image-only deployment when the stack is already managed and
|
|
144
|
+
the workflow only needs to release new images. Both forms support namespaces;
|
|
145
|
+
the namespace defaults to `default` when omitted.
|
|
146
|
+
|
|
147
|
+
### Authenticated Docker-Manager shell
|
|
148
|
+
|
|
149
|
+
Open an isolated Bash or Zsh session for a manager context:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
docker-stack shell office
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
The prompt displays `(docker:office)`, keeps the selected manager context active,
|
|
156
|
+
and refreshes authentication when needed. The session supports `docker` and
|
|
157
|
+
`docker compose`; legacy `docker-compose` is not supported. If authentication
|
|
158
|
+
expires, run `docker-stack login` again.
|
|
101
159
|
|
|
102
160
|
## Core Capabilities
|
|
103
161
|
|
|
@@ -176,9 +234,6 @@ Vanilla Docker Stack deployments can sometimes lack the flexibility needed for d
|
|
|
176
234
|
### Stored Source Metadata
|
|
177
235
|
Versioned stack configs include a top-level `x-files` list with base64-encoded source material for recovery and auditing. This includes the original compose file as `compose.yml`, a generated `.env` containing referenced non-secret environment values, and config files referenced by `configs.*.file` or `configs.*.x-template-file`. Secret source files and variables used by `secrets.*.environment` are not stored in `x-files`.
|
|
178
236
|
|
|
179
|
-
### Known Issues
|
|
180
|
-
Stored `x-files` metadata is written into Docker configs during local deploys. Docker config content is limited to 500 KB, and base64-encoded source files add roughly 33% overhead, so stacks with large compose/config source files can exceed the Docker config payload limit even when the rendered compose is valid.
|
|
181
|
-
|
|
182
237
|
### `x-generate`: Dynamic Secret Generation (Secrets Only)
|
|
183
238
|
This powerful feature allows you to automatically generate random secrets based on specified criteria, eliminating the need to manually create and manage them. This is particularly useful for passwords, API keys, and other sensitive data.
|
|
184
239
|
|
|
@@ -282,6 +337,11 @@ Vanilla Docker Stack deployments can sometimes lack the flexibility needed for d
|
|
|
282
337
|
uppercase: false
|
|
283
338
|
```
|
|
284
339
|
|
|
340
|
+
## Known Limitations
|
|
341
|
+
|
|
342
|
+
Docker limits config content to 500 KB. Stack history includes encoded source
|
|
343
|
+
files, so stacks with large compose or config files can exceed that limit.
|
|
344
|
+
|
|
285
345
|
## Development
|
|
286
346
|
|
|
287
347
|
Install runtime and test dependencies with either:
|
|
@@ -52,12 +52,49 @@ steps:
|
|
|
52
52
|
- run: docker-stack deploy my-stack docker-compose.yml
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
Use this option when CI can connect directly to the target Docker daemon.
|
|
56
56
|
|
|
57
57
|
#### 2. Docker-Manager
|
|
58
58
|
|
|
59
59
|
Use the bundled action when deploying through Docker-Manager:
|
|
60
60
|
|
|
61
|
+
For a full compose deployment directly from CI, use the action to configure
|
|
62
|
+
Docker-Manager authentication and then run the normal `docker-stack deploy`
|
|
63
|
+
command:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
permissions:
|
|
67
|
+
contents: read
|
|
68
|
+
id-token: write
|
|
69
|
+
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/checkout@v4
|
|
72
|
+
- uses: mesudip/docker-stack@v2
|
|
73
|
+
with:
|
|
74
|
+
manager: https://manager.example.com:2378
|
|
75
|
+
- run: docker-stack deploy --namespace team-a --with-registry-auth my-stack docker-compose.yml
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
You can also deploy the full compose file through action inputs:
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
permissions:
|
|
82
|
+
contents: read
|
|
83
|
+
id-token: write
|
|
84
|
+
|
|
85
|
+
steps:
|
|
86
|
+
- uses: actions/checkout@v4
|
|
87
|
+
- uses: mesudip/docker-stack@v2
|
|
88
|
+
with:
|
|
89
|
+
manager: https://manager.example.com:2378
|
|
90
|
+
stack: my-stack
|
|
91
|
+
compose-file: docker-compose.yml
|
|
92
|
+
namespace: team-a
|
|
93
|
+
with-registry-auth: "true"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
To release new service images without submitting the compose file again:
|
|
97
|
+
|
|
61
98
|
```yaml
|
|
62
99
|
permissions:
|
|
63
100
|
contents: read
|
|
@@ -68,10 +105,31 @@ steps:
|
|
|
68
105
|
- uses: mesudip/docker-stack@v2
|
|
69
106
|
with:
|
|
70
107
|
manager: https://manager.example.com:2378
|
|
71
|
-
|
|
108
|
+
stack: my-stack
|
|
109
|
+
namespace: team-a
|
|
110
|
+
with-registry-auth: "true"
|
|
111
|
+
images: |
|
|
112
|
+
api=ghcr.io/acme/api:${{ github.sha }}
|
|
113
|
+
worker=ghcr.io/acme/worker:${{ github.sha }}
|
|
72
114
|
```
|
|
73
115
|
|
|
74
|
-
|
|
116
|
+
Use a full compose deployment when the workflow owns the complete stack
|
|
117
|
+
definition. Use an image-only deployment when the stack is already managed and
|
|
118
|
+
the workflow only needs to release new images. Both forms support namespaces;
|
|
119
|
+
the namespace defaults to `default` when omitted.
|
|
120
|
+
|
|
121
|
+
### Authenticated Docker-Manager shell
|
|
122
|
+
|
|
123
|
+
Open an isolated Bash or Zsh session for a manager context:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
docker-stack shell office
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The prompt displays `(docker:office)`, keeps the selected manager context active,
|
|
130
|
+
and refreshes authentication when needed. The session supports `docker` and
|
|
131
|
+
`docker compose`; legacy `docker-compose` is not supported. If authentication
|
|
132
|
+
expires, run `docker-stack login` again.
|
|
75
133
|
|
|
76
134
|
## Core Capabilities
|
|
77
135
|
|
|
@@ -150,9 +208,6 @@ Vanilla Docker Stack deployments can sometimes lack the flexibility needed for d
|
|
|
150
208
|
### Stored Source Metadata
|
|
151
209
|
Versioned stack configs include a top-level `x-files` list with base64-encoded source material for recovery and auditing. This includes the original compose file as `compose.yml`, a generated `.env` containing referenced non-secret environment values, and config files referenced by `configs.*.file` or `configs.*.x-template-file`. Secret source files and variables used by `secrets.*.environment` are not stored in `x-files`.
|
|
152
210
|
|
|
153
|
-
### Known Issues
|
|
154
|
-
Stored `x-files` metadata is written into Docker configs during local deploys. Docker config content is limited to 500 KB, and base64-encoded source files add roughly 33% overhead, so stacks with large compose/config source files can exceed the Docker config payload limit even when the rendered compose is valid.
|
|
155
|
-
|
|
156
211
|
### `x-generate`: Dynamic Secret Generation (Secrets Only)
|
|
157
212
|
This powerful feature allows you to automatically generate random secrets based on specified criteria, eliminating the need to manually create and manage them. This is particularly useful for passwords, API keys, and other sensitive data.
|
|
158
213
|
|
|
@@ -256,6 +311,11 @@ Vanilla Docker Stack deployments can sometimes lack the flexibility needed for d
|
|
|
256
311
|
uppercase: false
|
|
257
312
|
```
|
|
258
313
|
|
|
314
|
+
## Known Limitations
|
|
315
|
+
|
|
316
|
+
Docker limits config content to 500 KB. Stack history includes encoded source
|
|
317
|
+
files, so stacks with large compose or config files can exceed that limit.
|
|
318
|
+
|
|
259
319
|
## Development
|
|
260
320
|
|
|
261
321
|
Install runtime and test dependencies with either:
|