Skip to content

Commit

Permalink
Merge pull request #551 from ukkopahis/doc-code-highlight
Browse files Browse the repository at this point in the history
Docs: fix and add missing code highlight
  • Loading branch information
Slyke authored Jun 12, 2022
2 parents 303f649 + b0b5a4e commit 6014b73
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
31 changes: 17 additions & 14 deletions docs/Basic_setup/Custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@

Each time you build the stack from the menu, the Docker Compose file
`docker-compose.yml` is recreated, losing any custom changes you've made. There
are three ways of dealing with this:

1. Not using the menu after you've made changes. Do remember to backup, in
case you overwrite it by mistake or habit from the menu.
2. Use the Docker Compose's [inbuilt override
mechanism](https://docs.docker.com/compose/extends/). This limits you to
changing values already present in your `docker-compose.yml`, but is handy
as changes are immediately picked by running `docker-compose up -d`.
are different ways of dealing with this:

1. Not using the menu after you've made changes. Do remember to backup your
customized `docker-compose.yml`, in case you overwrite it by mistake or
habit from the menu.
2. Use the Docker Compose [inbuilt override mechanism](
https://docs.docker.com/compose/extends/) by creating a file named
`docker-compose.override.yml`. This limits you to changing values and
appending to lists already present in your docker-compose.yml, but it's
handy as changes are immediately picked up by docker-compose commands. To
see the resulting final config run `docker-compose config`.
3. IOTstack menu, in the default master-branch, implements a mechanism to
merge the yaml file `compose-override.yml` with the menu-generated stack
into `docker-compose.yml`. This can be used to add even complete new
services. See below for details.
4. This is not an actual extension mechanism, but well worth mentioning: If
you need to add a new services that don't communicate with the services in
IOTstack, you can create it completely separately and independently into
its own folder, e.g. `~/customStack/docker-compose.yml`. These services can
then be independently managed by entering that folder: `cd ~/customStack`
and then using the `docker-compose` commands as normal. The best override is
the one you don't have to make.
you need a new services that doesn't communicate with the services in
IOTstack, create it completely separately and independently into its own
folder, e.g. `~/customStack/docker-compose.yml`. This composition can then
be independently managed from that folder: `cd ~/customStack` and use
`docker-compose` commands as normal. The best override is the one you don't
have to make.

## Custom services and overriding default settings for IOTstack
You can specify modifcations to the `docker-compose.yml` file, including your own networks and custom containers/services.
Expand Down
6 changes: 3 additions & 3 deletions docs/Basic_setup/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ $ git status

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

```
``` output
modified: .templates/mosquitto/Dockerfile
```

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

2. change:

```
``` json
"log-driver": "journald",
```

to:

```
``` json
"log-driver": "json-file",
```

Expand Down
4 changes: 3 additions & 1 deletion docs/Containers/Home-Assistant.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ your RPi hostname is raspberrypi)
7. Forward to correct IP when target is a container running in "network_mode:
host" (like Home Assistant does):

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

0 comments on commit 6014b73

Please sign in to comment.