forked from withfig/autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.ts
277 lines (276 loc) · 6.5 KB
/
docker-compose.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
const completionSpec: Fig.Spec = {
name: "docker-compose",
description: "Define and run multi-container applications with Docker",
subcommands: [
{
name: "build",
description: "Build or rebuild services",
loadSpec: "docker/compose-build",
},
{
name: "config",
description: "Validate and view the Compose file",
loadSpec: "docker/compose-config",
},
{
name: "create",
description: "Creates containers for a service",
loadSpec: "docker/compose-create",
},
{
name: "down",
description:
"Stops containers and removes containers, networks, volumes, and images",
loadSpec: "docker/compose-down",
},
{
name: "events",
description: "Receive real time events from containers",
loadSpec: "docker/compose-events",
},
{
name: "exec",
description: "Execute a command in a running container",
loadSpec: "docker/compose-exec",
},
{
name: "help",
description: "Get help on a command",
},
{
name: "images",
description: "List images used by the created containers",
loadSpec: "docker/compose-images",
},
{
name: "kill",
description: "Force stop service containers",
loadSpec: "docker/compose-kill",
},
{
name: "logs",
description: "View output from containers",
loadSpec: "docker/compose-logs",
},
{
name: "pause",
description: "Pause services",
loadSpec: "docker/compose-pause",
},
{
name: "port",
description: "Print the public port for a port binding",
loadSpec: "docker/compose-port",
},
{
name: "ps",
description: "List containers",
loadSpec: "docker/compose-ps",
},
{
name: "pull",
description:
"Pulls images for services defined in a Compose file, but does not start the containers",
loadSpec: "docker/compose-pull",
},
{
name: "push",
description: "Pushes images for services",
options: [
{
name: "--ignore-push-failures",
description: "Push what it can and ignores images with push failures",
args: {},
},
],
},
{
name: "restart",
description: "Restart running containers",
loadSpec: "docker/compose-restart",
},
{
name: "rm",
description: "Removes stopped service containers",
loadSpec: "docker/compose-rm",
},
{
name: "run",
description: "Run a one-off command on a service",
loadSpec: "docker/compose-run",
},
{
name: "scale",
description: "Set number of containers to run for a service",
options: [
{
name: ["-t", "--timeout"],
description: "Specify a shutdown timeout in seconds. (default: 10)",
args: {},
},
],
},
{
name: "start",
description: "Start existing containers",
loadSpec: "docker/compose-start",
},
{
name: "stop",
description: "Stop running containers without removing them",
loadSpec: "docker/compose-stop",
},
{
name: "top",
description: "Display the running processes",
},
{
name: "unpause",
description: "Unpause services",
},
{
name: "up",
description:
"Builds, (re)creates, starts, and attaches to containers for a service",
loadSpec: "docker/compose-up",
},
{
name: "version",
description: "Show version information and quit",
options: [
{
name: "--short",
description: "Shows only Compose's version number",
args: {},
},
],
},
],
options: [
{
args: {
name: "Docker Compose File",
generators: {
template: "filepaths",
filterTemplateSuggestions: function (paths) {
const suffix = ".yml";
return paths.filter((file) => {
return (
file.name.indexOf(suffix, this.length - suffix.length) >= 0
);
});
},
},
},
description: "Specify an alternate compose file",
name: ["-f", "--file"],
},
{
args: {
name: "string",
},
description: "Specify an alternate project name",
name: ["-p", "--project-name"],
},
{
args: {
name: "string",
},
description: "Specify a profile to enable",
name: "--profile",
},
{
args: {
name: "string",
},
description: "Specify a context name",
name: ["-c", "--context"],
},
{
description: "Show more output",
name: "--verbose",
},
{
args: {
name: "LEVEL",
},
description: "Set log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)",
name: "--log-level",
},
{
args: {
name: "(never|always|auto)",
},
description: "Control when to print ANSI control characters",
name: "--ansi",
},
{
description: "Do not print ANSI control characters (DEPRECATED)",
name: "--no-ansi",
},
{
description: "Print version and exit",
name: ["-v", "--version"],
},
{
args: {
name: "HOST",
},
description: "Daemon socket to connect to",
name: ["-H", "--host"],
},
{
description: "Use TLS; implied by --tlsverify",
name: "--tls",
},
{
args: {
name: "CA_PATH",
},
description: "Trust certs signed only by this CA",
name: "--tlscacert",
},
{
args: {
name: "CLIENT_CERT_PATH",
},
description: "Path to TLS certificate file",
name: "--tlscert",
},
{
args: {
name: "TLS_KEY_PATH",
},
description: "Path to TLS key file",
name: "--tlskey",
},
{
description: "Use TLS and verify the remote",
name: "--tlsverify",
},
{
description: "Don't check the daemon's hostname against the",
name: "--skip-hostname-check",
},
{
args: {
name: "PATH",
},
description: "Specify an alternate working directory",
name: "--project-directory",
},
{
description: "If set, Compose will attempt to convert keys",
name: "--compatibility",
},
{
args: {
name: "PATH",
template: "filepaths",
},
description: "Specify an alternate environment file",
name: "--env-file",
},
],
};
export default completionSpec;