-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.yml
More file actions
67 lines (64 loc) · 2.64 KB
/
Copy pathcompose.yml
File metadata and controls
67 lines (64 loc) · 2.64 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
services:
mongodb:
image: docker.io/mongo:8.3.2-noble
restart: unless-stopped
volumes:
- ./var/container-data/mongodb:/data/db:rw,cached
# This is a helper directory we use for import/export operations.
# See the `mongodb-dump` and `mongodb-import` just recipes.
- ./var/mongodb-io:/mongodb-io:rw,cached
nginx:
image: docker.io/nginx:1.31.1-alpine
restart: unless-stopped
ports:
- "${NGINX_HTTP_BIND_ADDRESS}:8080"
label_file: ./var/nginx-labels
# Any random non-root user will do
user: 4000:4000
entrypoint: /bin/sh
command: -c 'nginx -g "daemon off;"'
working_dir: /public
volumes:
- ./etc/services/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./etc/services/nginx/vhost.conf:/etc/nginx/conf.d/default.conf:ro
- ./app/public:/public:ro,cached
tmpfs:
- /tmp
php:
build: ./etc/docker/php
image: devture/nagadmin-php:8.5-alpine-3.23.4-1
# We run PHP with the same user that Nagios runs with, because
# we need it to be able to write to the nagios.cmd file.
user: 100:101
restart: unless-stopped
stop_signal: QUIT
stop_grace_period: 15s
volumes:
- ./:/code:rw,cached
nagios:
# This is Nagios v4.5.12 (Alpine 3.23).
# See https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md
# Our nagios.cfg/cgi.cfg + generated config validate cleanly on this version
# (verified via `nagios -v`). Note: build-8 was intentionally avoided — it is
# the one build in this series missing `bind-tools`, which breaks check_dns.
image: docker.io/manios/nagios:build-35
restart: unless-stopped
ports:
- "${NAGIOS_HTTP_BIND_ADDRESS}:80"
label_file: ./var/nagios-labels
volumes:
# The live Nagios base config (nagios.cfg, cgi.cfg, htpasswd.users) is seeded from the
# `.dist` templates in etc/services/nagios/etc/ into this untracked directory on first run
# (see the `_var-container-data-nagios-etc` just recipe). It is mounted read-write because
# the container entrypoint writes to it (use_timezone, htpasswd.users) — keeping those
# mutations out of the git-tracked tree.
- ./var/container-data/nagios/etc:/opt/nagios/etc:rw,cached
- ./var/container-data/nagios/var:/opt/nagios/var:rw,cached
- ./var/container-data/nagadmin-generated-config:/nagadmin-generated-config:ro,cached
# Drop-in directory for custom check plugins, available to commands as
# $USER1$/custom/<plugin>. See the README FAQ.
- ./var/nagios-custom-plugins:/opt/nagios/libexec/custom:ro,cached
environment:
NAGIOSADMIN_USER: ${NAGIOSADMIN_USER}
NAGIOSADMIN_PASS: ${NAGIOSADMIN_PASS}
TZ: ${TZ}