docs(docker-compose): No need to ask for a context, we set a dummy context in docs
This commit is contained in:
parent
5645fba3e1
commit
5c8cf16348
@ -33,7 +33,6 @@ This is Cookiecutter prompting for info:
|
|||||||
project_slug [dir-name]: grafana
|
project_slug [dir-name]: grafana
|
||||||
service [grafana]:
|
service [grafana]:
|
||||||
component_list [grafana]: grafana,nginx
|
component_list [grafana]: grafana,nginx
|
||||||
context [ctx]: cncf
|
|
||||||
Select build:
|
Select build:
|
||||||
1 - no
|
1 - no
|
||||||
2 - yes
|
2 - yes
|
||||||
@ -190,7 +189,6 @@ Make some code changes, for example to the Docker Compose Cookiecutter template.
|
|||||||
project_slug [dir-name]: mydir
|
project_slug [dir-name]: mydir
|
||||||
service [mydir]: myservice
|
service [mydir]: myservice
|
||||||
component_list [myservice]: mycomponent_one,mycomponent_two
|
component_list [myservice]: mycomponent_one,mycomponent_two
|
||||||
context [ctx]: ux_novosibirsk
|
|
||||||
Select build:
|
Select build:
|
||||||
1 - no
|
1 - no
|
||||||
2 - yes
|
2 - yes
|
||||||
@ -233,7 +231,6 @@ Make some code changes, for example to the Docker Compose Cookiecutter template.
|
|||||||
project_slug=mydir \
|
project_slug=mydir \
|
||||||
service=myservice \
|
service=myservice \
|
||||||
component_list=mycomponent_one,mycomponent_two \
|
component_list=mycomponent_one,mycomponent_two \
|
||||||
context=ux_novosibirsk \
|
|
||||||
build=yes
|
build=yes
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ Cookiecutter interactively prompts you for the following info, here with example
|
|||||||
project_slug [dir-name]: grafana
|
project_slug [dir-name]: grafana
|
||||||
service [grafana]:
|
service [grafana]:
|
||||||
component_list [grafana]: grafana,nginx
|
component_list [grafana]: grafana,nginx
|
||||||
context [ctx]: cncf
|
|
||||||
Select build:
|
Select build:
|
||||||
1 - no
|
1 - no
|
||||||
2 - yes
|
2 - yes
|
||||||
@ -64,22 +63,7 @@ Your four answers translate as follows into rendered files.
|
|||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
4. The `context` prompt is a generic string to help you distinguish deployments. It can be whatever you want such as for example a team name, here `cncf` which shows up as a preset in an example env file. It defaults to `ctx` just so it can't be empty.
|
4. Prompt `build` is a yes-no question. Cookiecutter will create a `README.md` file with copy-pastable Docker Compose commands pre-filled. If you answer `yes` to this prompt `README.md` will contain an example paragraph that explains the build process along the lines of:
|
||||||
```
|
|
||||||
.
|
|
||||||
└── grafana
|
|
||||||
...
|
|
||||||
└── env
|
|
||||||
└── fqdn_context.env.example <---
|
|
||||||
```
|
|
||||||
|
|
||||||
Which then looks like:
|
|
||||||
```
|
|
||||||
CONTEXT=cncf
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
5. Prompt `build` is a yes-no question. Cookiecutter will create a `README.md` file with copy-pastable Docker Compose commands pre-filled. If you answer `yes` to this prompt `README.md` will contain an example paragraph that explains the build process along the lines of:
|
|
||||||
```
|
```
|
||||||
docker compose ... --profile 'build' build
|
docker compose ... --profile 'build' build
|
||||||
```
|
```
|
||||||
|
@ -2,8 +2,7 @@ import sys
|
|||||||
|
|
||||||
service_slug = "{{ cookiecutter.__service_slug }}"
|
service_slug = "{{ cookiecutter.__service_slug }}"
|
||||||
component_list_slug = "{{ cookiecutter.__component_list_slug }}"
|
component_list_slug = "{{ cookiecutter.__component_list_slug }}"
|
||||||
context_slug = "{{ cookiecutter.__context_slug }}"
|
for v in (service_slug, component_list_slug):
|
||||||
for v in (service_slug, component_list_slug, context_slug):
|
|
||||||
if not v:
|
if not v:
|
||||||
print(f"Please answer all prompts with a non-empty string. Aborting and exiting 3 ...")
|
print(f"Please answer all prompts with a non-empty string. Aborting and exiting 3 ...")
|
||||||
sys.exit(3)
|
sys.exit(3)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user