lixonet-ee/docker-compose.yml
2020-06-23 13:01:16 -06:00

71 lines
1.5 KiB
YAML

version: "3.7"
services:
tinc:
build:
context: .
dockerfile: Dockerfile.tinc
volumes:
- /etc/tinc/${netname}:/etc/tinc/${netname}
- /usr/bin/docker-proxy:/usr/bin/docker-proxy
environment:
- RUNMODE=server
- NETNAME=${netname}
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
restart: always
networks:
internal:
ipv4_address: ${internal_address}
bird:
network_mode: 'service:tinc'
depends_on:
- tinc
build:
context: .
dockerfile: Dockerfile.bird
volumes:
- /etc/bird/${netname}/:/etc/bird/
- bird-run:/var/run/bird/
cap_add:
- NET_ADMIN
restart: always
bind:
network_mode: 'service:tinc'
build:
context: .
dockerfile: Dockerfile.bind
volumes:
- /etc/bind/${netname}/:/etc/bind/
restart: always
bird_exporter:
network_mode: 'service:tinc'
image: czerwonk/bird_exporter
command: '-bird.v2=true -bird.socket=/var/run/bird/bird.ctl'
depends_on:
- bird
volumes:
- bird-run:/var/run/bird/
restart: always
ping_exporter:
network_mode: 'service:tinc'
image: czerwonk/ping_exporter
command: './ping_exporter --config.path /pinger.yml'
depends_on:
- tinc
volumes:
- /etc/tinc/${netname}/pinger.yml:/pinger.yml
restart: always
volumes:
bird-run:
networks:
internal:
driver: macvlan
driver_opts:
parent: eth0
ipam:
config:
- subnet: ${internal_subnet:-$internal_gateway/24}