29 lines
805 B
Plaintext
Raw Normal View History

2020-06-28 13:45:25 -06:00
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:
2023-04-12 18:25:39 -06:00
{{ if len "${internal_address:-}" }} ipv4_address: ${internal_address}{{ end }}
2022-12-22 13:08:23 -07:00
sysctls:
2022-12-22 13:07:50 -07:00
{{ if ne "true" "${ipv6_enabled}" }}
2022-12-22 13:08:58 -07:00
- net.ipv6.conf.all.disable_ipv6=1
2022-12-22 13:07:50 -07:00
{{ else }}
2022-12-22 13:08:58 -07:00
- net.ipv6.conf.all.disable_ipv6=0
2022-12-22 10:14:21 -07:00
{{ end }}
2023-04-12 18:32:24 -06:00
{{ if eq "bridge" "${network_mode:-macvlan}" }}
ports:
- "${tinc_bind_port:-9993}:${tinc_bind_port:-9993}/tcp"
- "${tinc_bind_port:-9993}:${tinc_bind_port:-9993}/udp"
{{ end }}