11# dktp
22
3+ A simple cli to interact with Azure ContainerApps with arm/yaml templates
4+
5+ ## Usage
6+
7+ ``` shell
8+ Usage: dktp [options] [command]
9+
10+ CLI to help working dktp apps
11+
12+ Options:
13+ -h, --help display help for command
14+
15+ Commands:
16+ wrap [options] < configfile> [outputfile] Download secrets, and encrypt environment
17+ run [options] < env_file> < command...> Run command with environment variables from lock-file
18+ inspect [options] < env_file> Print content of encrypted lock-file
19+ help [command] display help for command
20+ ```
21+
22+ ### Wrap: Download and encrypt environment
23+
24+ ``` shell
25+ Usage: dktp wrap [options] < configfile> [outputfile]
26+
27+ Download secrets, and encrypt environment
28+
29+ Arguments:
30+ configfile Path to dktp yaml file
31+ outputfile Path to encrypted vault file
32+
33+ Options:
34+ -c, --container < container_name> Container name to process (defaults to create a combined env file)
35+ -e, --env < env_file> Envfile to use for interpolation
36+ -h, --help display help for command
37+
38+
39+ Example: dktp wrap example/main.yml -e example/prod.env example/prod.env.locked
40+ ```
41+
42+ ### Run: Start a process with environment variable set
43+
44+ ``` shell
45+ Usage: dktp run [options] < env_file> < command...>
46+
47+ Run command with environment variables from lock-file
48+
49+ Arguments:
50+ env_file Envfile to use for process
51+ command The command to run
52+
53+ Options:
54+ -o, --override [keyvalue...] Override or pass extra environment variable, e.g MY_VAR=abba (default: {})
55+ -h, --help display help for command
56+
57+
58+ Example: dktp run example/prod.env.locked -o APP_NAME=Hello -- node index.mjs
59+ ```
60+
61+ ### Inspect: Print the content of a encrypted lock-file
62+
63+ ``` shell
64+ Usage: dktp inspect [options] < env_file>
65+
66+ Print content of encrypted lock-file
67+
68+ Arguments:
69+ env_file File to inspect
70+
71+ Options:
72+ -o, --override [keyvalue...] Override or pass extra environment variable, e.g MY_VAR=abba (default: {})
73+ -h, --help display help for command
74+
75+
76+ Example: dktp inspect example/prod.env.locked -o APP_NAME=Hello
77+ ```
78+
79+
80+
81+ ## Contribution
382To install dependencies:
483
584``` bash
@@ -12,4 +91,12 @@ To run:
1291bun run src/index.ts
1392```
1493
15- This project was created using ` bun init ` in bun v1.0.30. [ Bun] ( https://bun.sh ) is a fast all-in-one JavaScript runtime.
94+ To test wrapping of secrets;
95+ 1 . Update [ targetPlatform.ts] ( src/utils/targetPlatform.ts ) to set ` AZ_MOCK = true ` .
96+ 2 . Run ` bun run src/index.ts wrap example/main.yml -e example/prod.env example/prod.env.locked `
97+
98+
99+ ### Commiting changes
100+
101+ This repository uses commitizen and conventional-changelog to determine which new semver-version should be used in a release.
102+ To help with keeping your commits correctly formatted please use ` bun commit ` / ` npm run commit ` .
0 commit comments