Skip to content

Commit 6014b73

Browse files
authored
Merge pull request #551 from ukkopahis/doc-code-highlight
Docs: fix and add missing code highlight
2 parents 303f649 + b0b5a4e commit 6014b73

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

docs/Basic_setup/Custom.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,28 @@
22

33
Each time you build the stack from the menu, the Docker Compose file
44
`docker-compose.yml` is recreated, losing any custom changes you've made. There
5-
are three ways of dealing with this:
6-
7-
1. Not using the menu after you've made changes. Do remember to backup, in
8-
case you overwrite it by mistake or habit from the menu.
9-
2. Use the Docker Compose's [inbuilt override
10-
mechanism](https://docs.docker.com/compose/extends/). This limits you to
11-
changing values already present in your `docker-compose.yml`, but is handy
12-
as changes are immediately picked by running `docker-compose up -d`.
5+
are different ways of dealing with this:
6+
7+
1. Not using the menu after you've made changes. Do remember to backup your
8+
customized `docker-compose.yml`, in case you overwrite it by mistake or
9+
habit from the menu.
10+
2. Use the Docker Compose [inbuilt override mechanism](
11+
https://docs.docker.com/compose/extends/) by creating a file named
12+
`docker-compose.override.yml`. This limits you to changing values and
13+
appending to lists already present in your docker-compose.yml, but it's
14+
handy as changes are immediately picked up by docker-compose commands. To
15+
see the resulting final config run `docker-compose config`.
1316
3. IOTstack menu, in the default master-branch, implements a mechanism to
1417
merge the yaml file `compose-override.yml` with the menu-generated stack
1518
into `docker-compose.yml`. This can be used to add even complete new
1619
services. See below for details.
1720
4. This is not an actual extension mechanism, but well worth mentioning: If
18-
you need to add a new services that don't communicate with the services in
19-
IOTstack, you can create it completely separately and independently into
20-
its own folder, e.g. `~/customStack/docker-compose.yml`. These services can
21-
then be independently managed by entering that folder: `cd ~/customStack`
22-
and then using the `docker-compose` commands as normal. The best override is
23-
the one you don't have to make.
21+
you need a new services that doesn't communicate with the services in
22+
IOTstack, create it completely separately and independently into its own
23+
folder, e.g. `~/customStack/docker-compose.yml`. This composition can then
24+
be independently managed from that folder: `cd ~/customStack` and use
25+
`docker-compose` commands as normal. The best override is the one you don't
26+
have to make.
2427

2528
## Custom services and overriding default settings for IOTstack
2629
You can specify modifcations to the `docker-compose.yml` file, including your own networks and custom containers/services.

docs/Basic_setup/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ $ git status
257257

258258
Check the results to see if any files are marked as "modified". For example:
259259

260-
```
260+
``` output
261261
modified: .templates/mosquitto/Dockerfile
262262
```
263263

@@ -351,13 +351,13 @@ Cannot create container for service [service name here]: unknown log opt 'max-fi
351351

352352
2. change:
353353

354-
```
354+
``` json
355355
"log-driver": "journald",
356356
```
357357

358358
to:
359359

360-
```
360+
``` json
361361
"log-driver": "json-file",
362362
```
363363

docs/Containers/Home-Assistant.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ your RPi hostname is raspberrypi)
163163
7. Forward to correct IP when target is a container running in "network_mode:
164164
host" (like Home Assistant does):
165165

166-
```console
166+
<!-- Note to documentation writers: using the console-highlighter would
167+
make the '#!/bin/sh'-line an unselectable "prompt". -->
168+
``` bash title="Note: in order for copy-paste to work properly, the usual $-prompts are omitted"
167169
cd ~/IOTstack
168170
cat << 'EOF' | sudo tee volumes/swag/config/custom-cont-init.d/add-host.docker.internal.sh
169171
#!/bin/sh

0 commit comments

Comments
 (0)