Skip to content
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

Feature Request: Provide a sample docker-compose.yml for easier container management #24

Open
M0E-lnx opened this issue Apr 6, 2021 · 2 comments

Comments

@M0E-lnx
Copy link

M0E-lnx commented Apr 6, 2021

I know docker offers some complex networking options and docker-compose offers a lot of functionality that could be useful to manager this by the docker daemon rather the systemd service file offered here. Unfortunately, I do not know docker or docker-compose well enough create such a complex setup. This would also make it easier to keep persistent data (such as configs) across upgrades.

My particular use case would have something like this:

openwrt-wan: DHCP address from the standard docker bridge network (this is provided by docker, so no config necessary here)
openwrt-lan: This would be a static IP that does need to be configured by a network block in docker-compose.yml

The docker-compose management approach would create and tear down the networks as necessary

This may be a helpful starting point: https://runnable.com/docker/docker-compose-networking

@oofnikj
Copy link
Owner

oofnikj commented Jun 25, 2021

Hi @M0E-lnx thanks for your suggestion.

I did try at first to implement this project using docker-compose but there are some additional responsibilities handled by the init script (network namespace stuff primarily among them) that cannot be addressed with docker-compose. This would require a wrapper script which only increases the complexity and dependencies of the deployment.

Regarding persistence, there is a doc explaining how to upgrade and preserve config. It's a little bit of a mess because of how OpenWrt handles upgrades in a typical squashfs deployment, but I've performed an upgrade across a couple of versions without issue.

An alternative approach might be to mount /etc/config as a Docker volume, but that would still require some additional steps to address missing packages, configuration file format changes, etc.

@hllhll
Copy link

hllhll commented Jun 26, 2021

I Also spent some time trying to "composify" the project with no success; I ended up running this first on boot; and executing my compose with other services after this has run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants