-
-
Save beastycoding/f07e06f93ada9f2a68962667f1996a75 to your computer and use it in GitHub Desktop.
docker-compose static IP example
This file contains 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