This guide provides common networking and deployment considerations for Docker Compose-based projects. These instructions focus on Synology DiskStations with DSM 7.2 or newer, but also apply to Linux and macOS.
Important
Make sure you configure the IPAM settings correctly in your .env file before deploying the stack. Incorrect settings can cause container networking issues.
Docker IPAM (IP Address Management) lets you assign IP addresses within a defined subnet, improving predictability and simplifying troubleshooting π οΈ.
Update these settings in your .env file:
#
# Subnet range: 172.28.0.1 - 172.28.255.254
# Subnet mask: 255.255.0.0
#
COMPOSE_NETWORK_SUBNET="${COMPOSE_NETWORK_SUBNET:-172.28.0.0/16}"
#
# IP range for containers: 172.28.5.1 - 172.28.5.254
# Subnet mask: 255.255.255.0
#
COMPOSE_NETWORK_IP_RANGE="${COMPOSE_NETWORK_IP_RANGE:-172.28.5.0/24}"
#
# Network gateway IP address
#
COMPOSE_NETWORK_GATEWAY="${COMPOSE_NETWORK_GATEWAY:-172.28.5.254}"For detailed documentation, refer to the Docker Compose IPAM documentation.
These settings are specific to configuring networking and deployment on Synology DiskStations.
Warning
Misconfigured firewall rules may prevent containers from communicating with each other or with external services. Double-check the source IP and subnet settings.
If your Synology DiskStation firewall is enabled, allow traffic for the custom Docker network:
- π οΈ Open Control Panel β Security (under Connectivity).
- π‘οΈ Go to the Firewall tab β Click Edit Rules.
- β Click Create to add a rule:
- π― Ports: Select
All - π Source IP: Select
Specific IP - π§© Click
Selectβ ChooseSubnet - π Enter
172.28.0.0for IP Address and255.255.0.0for Subnet mask/Prefix length - β
Action: Select
Allow
- π― Ports: Select
- πΎ Click OK to apply.
This allows containers to communicate internally within the defined Docker network.
Note
If you're running Synology DSM 7.2 or later, the Container Manager Project feature provides an easier and faster way to deploy your apps. Make sure your system is updated before proceeding.
To deploy a project using Synology Container Manager:
- π Log in to the Synology DSM web interface.
- π¦ Open Container Manager and navigate to the Project tab π.
- π Click Create and configure:
- π·οΈ Project Name: (e.g.,
calibre-web-automated) - π Project Path: Path to the cloned repository.
- π·οΈ Project Name: (e.g.,
- π Review and confirm the settings to deploy the project.
Refer to the official Synology documentation for further details.
These tips should help you get rolling π΄ββοΈ β may your containers stay healthy π₯ and your logs stay quiet π€«. Happy Dockering! π³π