From c0b05118479ec0f11650913b1e3874b0900ec52f Mon Sep 17 00:00:00 2001 From: ukkopahis <95980324+ukkopahis@users.noreply.github.com> Date: Thu, 28 Apr 2022 07:51:03 +0300 Subject: [PATCH 1/3] docs/Home-Assistant: fix highlighting preventing copy-paste --- docs/Containers/Home-Assistant.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/Containers/Home-Assistant.md b/docs/Containers/Home-Assistant.md index 99c0d2fb..b0764cb7 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 From 7aa41efb33215279d20142becf24034dad8df1f9 Mon Sep 17 00:00:00 2001 From: ukkopahis <95980324+ukkopahis@users.noreply.github.com> Date: Thu, 28 Apr 2022 08:52:29 +0300 Subject: [PATCH 2/3] docs: add missing code-block highlights --- docs/Basic_setup/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Basic_setup/index.md b/docs/Basic_setup/index.md index 676eea9a..010eae09 100644 --- a/docs/Basic_setup/index.md +++ b/docs/Basic_setup/index.md @@ -258,7 +258,7 @@ $ git status Check the results to see if any files are marked as "modified". For example: -``` +``` output modified: .templates/mosquitto/Dockerfile ``` @@ -352,13 +352,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", ``` From b0b5a4ebbfe50a8a8310937a056e3e2d94554a29 Mon Sep 17 00:00:00 2001 From: ukkopahis <95980324+ukkopahis@users.noreply.github.com> Date: Mon, 2 May 2022 10:09:46 +0300 Subject: [PATCH 3/3] docs/Custom: minor rewording --- docs/Basic_setup/Custom.md | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) 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.