|
2 | 2 |
|
3 | 3 | Each time you build the stack from the menu, the Docker Compose file
|
4 | 4 | `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`. |
13 | 16 | 3. IOTstack menu, in the default master-branch, implements a mechanism to
|
14 | 17 | merge the yaml file `compose-override.yml` with the menu-generated stack
|
15 | 18 | into `docker-compose.yml`. This can be used to add even complete new
|
16 | 19 | services. See below for details.
|
17 | 20 | 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. |
24 | 27 |
|
25 | 28 | ## Custom services and overriding default settings for IOTstack
|
26 | 29 | You can specify modifcations to the `docker-compose.yml` file, including your own networks and custom containers/services.
|
|
0 commit comments