-
-
Save EfimHaym/651e174fde64acad6dcb81769285ece3 to your computer and use it in GitHub Desktop.
docker-compose static IP example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3' | |
| networks: | |
| mynetwork: | |
| ipam: | |
| config: | |
| - subnet: 172.20.0.0/24 | |
| services: | |
| nodered1: | |
| image: nodered/node-red-docker | |
| ports: | |
| - "1880:1880" | |
| restart: always | |
| environment: | |
| - TZ | |
| - IP_BROKER=mqtt | |
| - DOCKER=true | |
| - PORT=1880 | |
| hostname: nodered1 | |
| networks: | |
| mynetwork: | |
| ipv4_address: 172.20.0.6 | |
| nodered2: | |
| image: nodered/node-red-docker | |
| ports: | |
| - "1881:1880" | |
| restart: always | |
| environment: | |
| - TZ | |
| - IP_BROKER=mqtt | |
| - DOCKER=true | |
| - PORT=1880 | |
| hostname: nodered2 | |
| networks: | |
| mynetwork: | |
| ipv4_address: 172.20.0.7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment