Created
January 29, 2021 09:56
-
-
Save ovuruska/543daae2ccf9ccf5173d620267eff5ea to your computer and use it in GitHub Desktop.
Yet Another networking example in docker compose
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: | |
cctv: | |
# IP Address Management | |
ipam: | |
config: | |
- subnet: 192.168.0.0/16 | |
services: | |
camera_1: | |
restart: unless-stopped | |
container_name: camera_1 | |
build: ./camera | |
networks: | |
cctv: | |
ipv4_address: 192.168.0.12 | |
camera_2: | |
restart: unless-stopped | |
container_name: camera_2 | |
build: ./camera | |
networks: | |
cctv: | |
ipv4_address: 192.168.0.13 | |
device: | |
restart: "no" | |
depends_on: | |
- "camera_1" | |
- "camera_2" | |
container_name: iot_device | |
build: ./iot_device | |
networks: | |
cctv: | |
ipv4_address: 192.168.0.15 | |
pull_policy: always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment