Skip to content

Instantly share code, notes, and snippets.

@ovuruska
Created January 29, 2021 09:56
Show Gist options
  • Save ovuruska/543daae2ccf9ccf5173d620267eff5ea to your computer and use it in GitHub Desktop.
Save ovuruska/543daae2ccf9ccf5173d620267eff5ea to your computer and use it in GitHub Desktop.
Yet Another networking example in docker compose
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