Update and rename docker-compose.yml to docker-compose.yml.tmpl

This commit is contained in:
sump pump 2020-06-28 13:49:40 -06:00 committed by GitHub
parent 2e4d335a2f
commit fdcd10550f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 72 deletions

View File

@ -1,72 +0,0 @@
version: "2"
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: ${internal_interface}
ipam:
config:
- subnet: ${internal_subnet}
gateway: ${internal_gateway}

16
docker-compose.yml.tmpl Normal file
View File

@ -0,0 +1,16 @@
version: "2"
services:
{{ range files "docker/services" }} {{ . }}:
{{ include (print "docker/services/" .) }}
{{ end }}
volumes:
{{ range files "docker/volumes" }} {{ . }}:
{{ include (print "docker/volumes/" .) }}
{{ end }}
networks:
{{ range files "docker/networks" }} {{ . }}:
{{ include (print "docker/networks/" .) }}
{{ end }}