Skip to content

Commit ff99331

Browse files
author
Slyke
committed
Added more information about the compose override file
1 parent 77283ef commit ff99331

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/Custom.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ You can specify modifcations to the `docker-compose.yml` file, including your ow
33

44
Create a file called `compose-override.yml` in the main directory, and place your modifications into it. These changes will be merged into the `docker-compose.yml` file next time you run the build script.
55

6+
The `compose-override.yml` file has been added to the `.gitignore` file, so it shouldn't be touched when upgrading IOTstack. It has been added to the backup script, and so will be included when you back up and restore IOTstack. Always test your backups though! New versions of IOTstack may break previous builds.
7+
68
## How it works
79
1. After the build process has been completed, a temporary docker compose file is created in the `tmp` directory.
810
2. The script then checks if `compose-override.yml` exists:
@@ -12,7 +14,7 @@ Create a file called `compose-override.yml` in the main directory, and place you
1214
4. Output the final file to the main directory, calling it `docker-compose.yml`.
1315

1416
## A word of caution
15-
If you specify an override for a service, and then rebuild the `compose-override.yml` file, but deselect the service from the list, then the YAML merging will still produce that override.
17+
If you specify an override for a service, and then rebuild the `docker-compose.yml` file, but deselect the service from the list, then the YAML merging will still produce that override.
1618

1719
For example, lets say NodeRed was selected to have have the following override specified in `compose-override.yml`:
1820
```
@@ -21,17 +23,19 @@ services:
2123
restart: always
2224
```
2325

24-
When rebuilding the menu, since the NodeRed service is not longer included, the only values showing in the final `docker-compose.yml` file for NodeRed will be the `restart` key and its value. Docker Compose will error with the following message:
26+
When rebuilding the menu, ensure to have NodeRed service always included because if it's no longer included, the only values showing in the final `docker-compose.yml` file for NodeRed will be the `restart` key and its value. Docker Compose will error with the following message:
2527
```
2628
Service nodered has neither an image nor a build context specified. At least one must be provided.
2729
```
2830

2931
When attempting to bring the services up with `docker-compose up -d`.
3032

33+
Either remove the override for NodeRed in `compose-override.yml` and rebuild the stack, or ensure that NodeRed is built with the stack to fix this.
34+
3135
## Examples
3236

3337
### Overriding default settings
34-
For example, lets assume you put the following into the `compose-override.yml` file:
38+
Lets assume you put the following into the `compose-override.yml` file:
3539
```
3640
services:
3741
mosquitto:

0 commit comments

Comments
 (0)