diff --git a/docs/Basic_setup/Custom.md b/docs/Basic_setup/Custom.md index 626eac13..79a3836d 100644 --- a/docs/Basic_setup/Custom.md +++ b/docs/Basic_setup/Custom.md @@ -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. diff --git a/docs/Basic_setup/index.md b/docs/Basic_setup/index.md index 7b86d702..5311ae43 100644 --- a/docs/Basic_setup/index.md +++ b/docs/Basic_setup/index.md @@ -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 ``` @@ -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", ``` diff --git a/docs/Containers/Home-Assistant.md b/docs/Containers/Home-Assistant.md index 4a01e890..dc43c8f6 100644 --- a/docs/Containers/Home-Assistant.md +++ b/docs/Containers/Home-Assistant.md @@ -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 + + ``` 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