Merge pull request '7-rewrite-docs-inconsistencies' (#8) from 7-rewrite-docs-inconsistencies into master

Reviewed-on: #8

Fixes #7
This commit is contained in:
hygienic-books 2023-06-12 22:35:06 +00:00
commit e0d39b389d
2 changed files with 29 additions and 11 deletions

View File

@ -19,7 +19,9 @@ Get Cookiecutter like so:
pip install cookiecutter pip install cookiecutter
``` ```
Execute a template like so, `docker-compose` as an example: Unfamiliar with Python and `pip`? Check out [Developing](#developing) further down to get started with a virtual environment.
When all is set execute a template like so, `docker-compose` as an example:
``` ```
cookiecutter https://quico.space/Quico/py-cookiecutter-templates.git --directory 'docker-compose' cookiecutter https://quico.space/Quico/py-cookiecutter-templates.git --directory 'docker-compose'
``` ```
@ -32,6 +34,10 @@ project_slug [dir-name]: grafana
service [grafana]: service [grafana]:
component_list [grafana]: grafana,nginx component_list [grafana]: grafana,nginx
context [ctx]: cncf context [ctx]: cncf
Select build:
1 - no
2 - yes
Choose from 1, 2 [1]:
``` ```
The end result is a directory structure that has everything you need to hit the ground running. The end result is a directory structure that has everything you need to hit the ground running.
@ -54,8 +60,9 @@ The end result is a directory structure that has everything you need to hit the
├── common-settings.yml ├── common-settings.yml
├── docker-compose.override.yml ├── docker-compose.override.yml
├── docker-compose.yml ├── docker-compose.yml
└── env ├── env
└── fully.qualified.domain.name.example │   └── fqdn_context.env.example
└── README.md
``` ```
# Developing # Developing
@ -184,28 +191,37 @@ Make some code changes, for example to the Docker Compose Cookiecutter template.
service [mydir]: myservice service [mydir]: myservice
component_list [myservice]: mycomponent_one,mycomponent_two component_list [myservice]: mycomponent_one,mycomponent_two
context [ctx]: ux_novosibirsk context [ctx]: ux_novosibirsk
Select build:
1 - no
2 - yes
Choose from 1, 2 [1]: 2
``` ```
- Observe that in `/tmp/cookiecutter-docker-compose` you now have your rendered Docker Compose dir: - Observe that in `/tmp/cookiecutter-docker-compose` you now have your rendered Docker Compose dir:
``` ```
# tree /tmp/cookiecutter-docker-compose # tree -a .
/tmp/cookiecutter-docker-compose .
└── mydir └── mydir
├── build-context ├── build-context
│   ├── mycomponent_one │   ├── mycomponent_one
│   │   ├── docker-data │   │   ├── docker-data
│   │   │   └── .gitkeep
│   │   ├── Dockerfile │   │   ├── Dockerfile
│   │   └── extras │   │   └── extras
│   │   └── .gitkeep
│   └── mycomponent_two │   └── mycomponent_two
│   ├── docker-data │   ├── docker-data
│   │   └── .gitkeep
│   ├── Dockerfile │   ├── Dockerfile
│   └── extras │   └── extras
│   └── .gitkeep
├── common-settings.yml ├── common-settings.yml
├── docker-compose.override.yml ├── docker-compose.override.yml
├── docker-compose.yml ├── docker-compose.yml
└── env ├── env
└── fqdn_context.env.example │   └── fqdn_context.env.example
└── README.md
``` ```
- For rapid testing you will most likely want to not type prompt answers repeatedly. Give them as command line arguments instead, also specify `--no-input` to suppress prompts: - For rapid testing you will most likely want to not type prompt answers repeatedly. Give them as command line arguments instead, also specify `--no-input` to suppress prompts:

View File

@ -111,8 +111,9 @@ Above example of a multi-component (two in this case) `grafana` service will giv
├── common-settings.yml ├── common-settings.yml
├── docker-compose.override.yml ├── docker-compose.override.yml
├── docker-compose.yml ├── docker-compose.yml
└── env ├── env
└── fully.qualified.domain.name.example │   └── fqdn_context.env.example
└── README.md
``` ```
Check out file contents over in the [examples/grafana](examples/grafana) subdir. Check out file contents over in the [examples/grafana](examples/grafana) subdir.
@ -131,8 +132,9 @@ With an alternative single-component `hashicorpvault` service the result may loo
├── common-settings.yml ├── common-settings.yml
├── docker-compose.override.yml ├── docker-compose.override.yml
├── docker-compose.yml ├── docker-compose.yml
└── env ├── env
└── fully.qualified.domain.name.example │   └── fqdn_context.env.example
└── README.md
``` ```
Check out file contents over in the [examples/hashicorpvault](examples/hashicorpvault) subdir. Check out file contents over in the [examples/hashicorpvault](examples/hashicorpvault) subdir.