Allow multiple networks and network groups

This commit is contained in:
Maurice
2025-08-13 13:57:08 +02:00
parent 9146046b91
commit 19d1bfe9a2
5 changed files with 214 additions and 41 deletions

View File

@@ -24,7 +24,6 @@ capabilities = ["NET_BIND_SERVICE"] # Optional property, add Linux capabilities
[service]
name = "<CONTAINER NAME>" # Container name, required
image = "<IMAGE>" # Podman image name
networks = ["<NETWORK>"] # Optional, if you want to run the container within a specific network. Set to "host" if you don't want to use the podman networking.
depend = ["<SERVICE NAME>"] # Name of any service in /etc/init.d to depend on
restart = "unless-stopped" # Restart, optional. Defaults to "unless-stopped"
detach = true # Run container in detach mode, optional, default true. Recommended.
@@ -35,6 +34,19 @@ command = "<COMMAND>" # Container command to run, optional.
[environment]
ASPNETCORE_ENVIRONMENT = "Test"
# If you have a not TOML-compatible key name, use "" around the key name
# Optional, if you want to run the container within specific network(s). Set to "host" if you don't want to use the podman networking.
[[networks]]
name = "host"
# You can also create groups
[[networks]]
name = "netw-service-test"
group = "http-networks"
# And assign ALL networks assigned to a group to a service
[[networks]]
group = "http-networks"
# Optionally, you can assign one or more port mappings
[[ports]]