Repository navigation
Separated networks - #3
casse-boubou wants to merge 126 commits into
Conversation
Set the CUSTOMS_NETWORKS environment variable to add multiple networks ex: CUSTOMS_NETWORKS=apps-internal-custom,app-external
Set the network.to.connect container LABEL for define the networks to connect the container
ex:
services:
swag:
container_name: swag
.......
labels:
- network.to.connect=apps-internal-custom,app-external
Some update in logs lines
|
This is a great idea! Keeping apps only on their relevant networks can improve security posture. I have a few minor suggestions:
I can go ahead and make these changes, or you could make them yourself if you prefer. Let me know what you think! |
|
Also, what do you think about creating networks on-the-fly rather than explicitly defining them in the environment variable beforehand? So all you would need to do is set the label I also think we should probably add labels to networks created by Dragonify so it can manage their lifecycle (e.g., deleting them when no longer in use). |
Change LABEL for Following Docker's recommendations
|
Hi
|
Add CONNECT_ALL ENV variable to maintain backward compatibility. Set it to "false" or "False" for disabling the auto-connection of all containers to the default apps-internal network
Adds a check for existing networks when connecting to networks in order to create one if necessary
Add a function to delete networks that are no longer in use
Remove the default network if the CONNECT_ALL ENV is set to "false" or "False"
|
Hum,
Personally I use it like this and it works very well: DragonifySWAG |
|
this container and especially this pull request is a lifesaver! congrats to you @tjhorner and @casse-boubou. i just changed the dns name to {service}.truenas. is more convenient. my use case is a swarm over all my docker hosts and have a proxy overlay network for the reverse proxy. i use the swarm with standalone containers, no high availability. only truenas was a bit of a headache with networks. i am really happy i found this project. i testet the pull request intensely and it works like a charm. please @tjhorner commit it. |
from seeing the app try to create a network that already exists
correct image name
Make Main Branch Distroless
Added comments for using a prebuilt image option.
|
Since this PR is not merged I cannot see how to run this version as described using I think I can probably make it work short-term using @tjhorner Can we get this merged? |
|
P.S. This PR needs to update the documentation to show two ways of running the service. And IMO this is so useful that it should be contributed to the Truenas App directory. |
|
I have a refactored version of Dragonify coded, and it is compiling cleanly but not yet tested - but I have gone back a few steps:
I am part way through documenting my (as yet incomplete) vision, and would welcome your input. Please see the work-in-progress README.md at https://github.com/Sophist-UK/dragonify/blob/main/README.md I would welcome any comments on my ideas - and please don't hold back. |
⬆️ Update docker node image to 8ec5d75
…odejs24-debian13-latest ⬆️ Update docker gcr.io/distroless/nodejs24-debian13 image to 85482a8
⬆️ Update docker node image to 173f125
Update dependency @types/dockerode to v4.0.2
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.14.4 to 1.14.6. - [Release notes](https://github.com/grpc/grpc-node/releases) - [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.14.4...@grpc/grpc-js@1.14.6) --- updated-dependencies: - dependency-name: "@grpc/grpc-js" dependency-version: 1.14.6 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…ckfile Update dependency stream-chain to v4.2.6
Update dependency @types/node to v24.19.2
…kfile Update dependency stream-json to v3.7.0
…er/buildFiles/npm/grpc/grpc-js-1.14.6 Bump @grpc/grpc-js from 1.14.4 to 1.14.6 in /docker/buildFiles/npm
Co-authored-by: Renovate Bot <bot@renovateapp.com>
⬆️ Update dependency p-queue to v9.3.5
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
…47) Co-authored-by: Renovate Bot <bot@renovateapp.com>
Improve Renovate config for automerge ans tag Add ReleaseDrafter for create and/or publush draft release
Update Renovate and ReleaseDrafter
Updated permissions for the Deploy packages job.
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
⬆️ MAJOR Update dependency p-queue to v10

Thank you for your work.
I think this addition could be very useful, please take a look.
Description:
Context:
Hi,
I've only had my very first NAS server for two weeks, and 25.04 is my first version.
So I'm not familiar with the capabilities you had with version 24.04, but having encountered issues connecting SWAG and some common services, I found your Custom_App after reading your discussion.
First of all, a GREAT GREAT THANK YOU! Using the container name as an identifier rather than its IP address is a basic principle for me, and I don't understand why it's missing from TrueNas. So thank you for your excellent work!!!
However, more than a network to bring them all (....and in the darkness bind them in), it's important for me to differentiate networks. Not all applications need to be networked, and not all need to be on the same network.
With this update, it's now possible to separate networks, and even better, a LABEL is enough to add an APP container to a network.
This also works with official or community apps.
HOW TO:
Networking
Networks are created by adding the CUSTOMS_NETWORKS ENV variable, separated by a comma.
This variable is not required, and if it is not set, the default value "apps-internal" will be used.
Connecting containers
To connect a container to a network, assign it the LABEL network.to.connect.
Multiple networks can be configured, separated by a comma.
Config by YAML
Setting up an APP Community