Skip to content

Commit 383d99a

Browse files
authored
Merge pull request #581 from ukkopahis/env-yml-rename
menu: rename env.yml to docker-compose-base.yml
2 parents e4e7fcd + 73ae03e commit 383d99a

File tree

5 files changed

+14
-20
lines changed

5 files changed

+14
-20
lines changed
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
networks:
1+
version: '3.6'
22

3+
networks:
34
default:
45
driver: bridge
56
ipam:
67
driver: default
7-
88
nextcloud:
99
driver: bridge
1010
internal: true
1111
ipam:
1212
driver: default
1313

14+
services:

docs/Developers/Menu-System.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ The Build Stack menu will execute the `runPostBuildHook()` function in the final
8282
The selected services' yaml configuration is already loaded into memory before the build stack process is started.
8383

8484
1. Run prebuildHooks.
85-
2. Create a new in memory `docker-compose.yml` structure.
86-
3. Merge the `./.templates/env.yml` file into `docker-compose.yml` memory.
85+
2. Read `./.templates/docker-compose-base.yml` file into a in memory yaml structure.
86+
3. Add selected services into the in memory structure.
8787
4. If it exists merge the `./compose-override.yml` file into memory
88-
5. Write the docker-compose in memory yaml structure to disk.
88+
5. Write the in memory yaml structure to disk `./docker-compose.yml`.
8989
6. Run postbuildHooks.
90-
7. Run `postbuild.sh` if it exists, with the list of services built.
90+
7. Run `postbuild.sh` if it exists, with the list of services built.

docs/Updates/migration-network-change.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ If you maintain your `docker-compose.yml` by hand, you can adopt the networking
3333
3. Append the contents of the following file to your `docker-compose.yml`:
3434

3535
```
36-
~/IOTstack/.templates/env.yml
36+
~/IOTstack/.templates/docker-compose-base.yml
3737
```
3838

3939
For example:
4040

4141
```
42-
$ cat ~/IOTstack/.templates/env.yml >>~/IOTstack/docker-compose.yml
42+
$ cat ~/IOTstack/.templates/docker-compose-base.yml >>~/IOTstack/docker-compose.yml
4343
```
4444

45-
The `env.yml` file is the same for both *old-menu* and *master* branches.
45+
The `docker-compose-base.yml` file is named `env.yml` in the *old-menu* branch.
4646

4747
4. If you run the NextCloud service then:
4848

scripts/buildstack_menu.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,12 @@ def buildServices(): # TODO: Move this into a dependency so that it can be execu
5252
global dockerComposeServicesYaml
5353
try:
5454
runPrebuildHook()
55-
dockerFileYaml = {}
5655
menuStateFileYaml = {}
57-
dockerFileYaml["version"] = "3.6"
58-
dockerFileYaml["services"] = {}
59-
menuStateFileYaml["services"] = {}
60-
dockerFileYaml["services"] = dockerComposeServicesYaml
6156
menuStateFileYaml["services"] = dockerComposeServicesYaml
6257

63-
if os.path.exists(envFile):
64-
with open(r'%s' % envFile) as fileEnv:
65-
envSettings = yaml.load(fileEnv)
66-
mergedYaml = mergeYaml(envSettings, dockerFileYaml)
67-
dockerFileYaml = mergedYaml
58+
with open(r'%s' % envFile) as fileEnv:
59+
dockerFileYaml = yaml.load(fileEnv)
60+
dockerFileYaml["services"] = dockerComposeServicesYaml
6861

6962
if os.path.exists(composeOverrideFile):
7063
with open(r'%s' % composeOverrideFile) as fileOverride:

scripts/deps/consts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
buildSettingsFileName = '/build_settings.yml'
77
buildCache = servicesDirectory + 'docker-compose.save.yml'
88
composeOverrideFile = './compose-override.yml'
9-
envFile = templatesDirectory + 'env.yml'
9+
envFile = templatesDirectory + 'docker-compose-base.yml'
1010
dockerPathOutput = './docker-compose.yml'
1111
servicesFileName = 'service.yml'
1212
ifCheckList = ['eth0', 'wlan0']

0 commit comments

Comments
 (0)