Configure local_bridge_mtu network in docker-compose#20
Configure local_bridge_mtu network in docker-compose#20vaclav-ssvlabs wants to merge 1 commit intossvlabs:mainfrom
Conversation
Added local_bridge_mtu network configuration to services.
There was a problem hiding this comment.
Pull Request Overview
Adds a custom user-defined bridge network with a reduced MTU and attaches services to it to standardize container networking.
- Introduces a local_bridge_mtu network with MTU set to 1420.
- Connects postgres, sync, and calc services to the new network.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| local_bridge_mtu: | ||
| driver: bridge | ||
| driver_opts: | ||
| com.docker.network.driver.mtu: 1420 |
There was a problem hiding this comment.
[nitpick] driver_opts values are expected as strings in Compose; quote the MTU to avoid type coercion issues across different Compose implementations.
| com.docker.network.driver.mtu: 1420 | |
| com.docker.network.driver.mtu: "1420" |
| networks: | ||
| - local_bridge_mtu |
There was a problem hiding this comment.
[nitpick] Since all services are attached to the same network solely to apply the MTU, consider configuring the default network instead. This eliminates duplication and automatically applies to all services. Example: replace the bottom block with a 'default' network and remove the per-service 'networks' entries shown above.
| networks: | ||
| - local_bridge_mtu |
There was a problem hiding this comment.
[nitpick] Since all services are attached to the same network solely to apply the MTU, consider configuring the default network instead. This eliminates duplication and automatically applies to all services. Example: replace the bottom block with a 'default' network and remove the per-service 'networks' entries shown above.
| networks: | ||
| - local_bridge_mtu | ||
|
|
||
| networks: | ||
| local_bridge_mtu: | ||
| driver: bridge | ||
| driver_opts: | ||
| com.docker.network.driver.mtu: 1420 |
There was a problem hiding this comment.
[nitpick] Since all services are attached to the same network solely to apply the MTU, consider configuring the default network instead. This eliminates duplication and automatically applies to all services. Example: replace the bottom block with a 'default' network and remove the per-service 'networks' entries shown above.
Added local_bridge_mtu network configuration to services.