Host-Ansible-Setup/services/service_nagios/docker-compose.yml

46 lines
1.3 KiB
YAML

services:
nagios-gluetun:
image: qmcgaw/gluetun
cap_add:
- NET_ADMIN
environment:
- VPN_SERVICE_PROVIDER=custom
- VPN_TYPE=wireguard
- VPN_ENDPOINT_IP={{ proxy_server_ip }}
- VPN_ENDPOINT_PORT={{ proxy_server_vpn_port }}
- WIREGUARD_PUBLIC_KEY={{ vpn_server_pubkey }}
- WIREGUARD_PRIVATE_KEY={{ nagios_backend_privkey }}
- WIREGUARD_ADDRESSES=10.0.0.198/32
- FIREWALL_VPN_INPUT_PORTS=11001,8080
ports:
# Web UI Port
- "11001:11001"
volumes:
# Custom IPTables forwarding rules to forward TCP(web) traffic from port 11001 to port 8080
- ./post-rules.txt:/iptables/post-rules.txt
deploy:
resources:
limits:
cpus: '0.10'
memory: 512M
nagios:
network_mode: "service:nagios-gluetun"
container_name: nagios
volumes:
- ./nagios-data/etc:/opt/nagios/etc/
- ./nagios-data/var:/opt/nagios/var/
- ./ssmtp.conf:/etc/ssmtp/ssmtp.conf
- ./nagios-plugins:/opt/Custom-Nagios-Plugins
environment:
- NAGIOSADMIN_USER={{ service_nagios_username }}
- NAGIOSADMIN_PASS={{ service_nagios_password }}
- TZ={{ service_nagios_timezone }}
image: manios/nagios:latest
deploy:
resources:
limits:
cpus: '0.10'
memory: 256M