-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added YAML merging Python script, with menu script modifications. Add… #38
Conversation
…ed minor changes and bug fixes to backup.
Seems like pyyaml is not installed on the lite version of Raspberry Pi. Adding fixes now. |
Great idea to have an override that can be automatically backed up together with the rest of the configuration files and volumes. When does the override happen? Every time the docker-compose.yml is compiled? What happens if some containers are deleted? - or not built when restoring certain containers from a backup? Certain parts of the compose-override would be relevant, but what about the parts relating to the containers that are not built? Would it make sense to have an override for each container? |
The override is merged in with the compose file when the menu's build process is running. The menu basically generates the I added it to the backup for convenience so that it doesn't need to be copied around manually when restoring (and you rebuild), but it technically doesn't need to exist after the build process is completed, you technically only need the Don't need an override for each container, it'd be kind of like asking for a You can always send me your current |
Ahh. I see. Guess I was confused by reading up on how docker handles |
Yup! The override file is just for IOTstack :). You could still use the official override if wanted, but I think for IOTstack's case, using the |
This branch has been merged into the Experimental branch for PR: #40 |
Added YAML merging Python script, with menu script modifications. Added minor changes and bug fixes to backup.
How this feature works:
If no
compose-override.yml
file is present in the main directory, thedocker-compose.yml
file is unmodified from the yaml builder.If the
compose-override.yml
file is present in the main directory, it will merge in and override any properties that are set.See screenshot for example:
Do note that lists are replaced.
So for example, if You have the ports:
And you set a port in the override:
Then the entire port list is replaced with what's specified in the override.
This PR removes the need for the custom services, and custom volume mounting since they can be specified in the override file.
The override file has also been added to the backup functionality, but I have not tested restoring it.
I need to update documentation for this in the wiki.
The override file is added to gitignore, so you don't need to worry about it being replaced or deleted when updating the project.