forked from JasonRivers/Docker-Nagios
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
37 lines (34 loc) · 1.21 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
# This compose file acts as an example on using docker volumes for nagios
# configuration. As nagios configurations are different for each site they are
# not considered part of the container image. The best way to deal with the
# configurations is to store them in a volume allowing the user to upgrade the
# image without the need to extract the site configuration from the container.
version: '3'
services:
nagios:
image: tronyx/nagios:latest
container_name: nagios
restart: on-failure
ports:
- "8080:80"
environment:
NAGIOS_TIMEZONE: America/New_York
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/etc/localtime:/etc/timezone:ro"
- nagiosetc:/opt/nagios/etc
- nagiosvar:/opt/nagios/var
- customplugins:/opt/Custom-Nagios-Plugins
- nagiosgraphvar:/opt/nagiosgraph/var
- nagiosgraphetc:/opt/nagiosgraph/etc
- nagiosa2logs:/var/log/apache2
volumes:
# To change from Docker-managed volumes to bind mounts, add a driver_opts section as detailed here
# https://stackoverflow.com/questions/35841241/docker-compose-named-mounted-volume
nagiosetc:
nagiosvar:
customplugins:
nagiosgraphvar:
nagiosgraphetc:
nagiosa2logs: