-
-
Notifications
You must be signed in to change notification settings - Fork 437
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (71 loc) · 2.05 KB
/
docker-compose.yml
File metadata and controls
74 lines (71 loc) · 2.05 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
68
69
70
71
72
73
74
# Cacti Development Environment
#
# Usage:
# cp .env.example .env
# docker compose up -d
#
# Access Cacti at http://localhost:8080/cacti
# Schema auto-imported on first DB start; complete the web installer to finish setup.
services:
web:
build:
context: .
dockerfile: docker/Dockerfile
container_name: cacti_web
ports:
- "${WEB_PORT:-8080}:80"
volumes:
# Source code (ro); named volumes overlay cache/rra/log to keep them out of the tree.
- .:/var/www/html/cacti
- cacti_cache:/var/www/html/cacti/cache
- cacti_rra:/var/www/html/cacti/rra
- cacti_logs:/var/www/html/cacti/log
environment:
DB_HOST: db
DB_PORT: 3306
DB_USER: ${DB_USER:-cacti}
DB_PASS: ${DB_PASSWORD:-cacti}
DB_NAME: ${DB_NAME:-cacti}
PHP_MEMORY_LIMIT: ${PHP_MEMORY_LIMIT:-512M}
TIMEZONE: ${TIMEZONE:-UTC}
depends_on:
db:
condition: service_healthy
restart: unless-stopped
db:
image: mariadb:11.8
container_name: cacti_db
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-root}
MYSQL_DATABASE: ${DB_NAME:-cacti}
MYSQL_USER: ${DB_USER:-cacti}
MYSQL_PASSWORD: ${DB_PASSWORD:-cacti}
TZ: ${TIMEZONE:-UTC}
ports:
- "127.0.0.1:${DB_PORT:-3306}:3306"
volumes:
- cacti_db:/var/lib/mysql
- ./cacti.sql:/docker-entrypoint-initdb.d/cacti.sql:ro
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --max-connections=${DB_MAX_CONNECTIONS:-200}
- --max-heap-table-size=128M
- --tmp-table-size=128M
- --join-buffer-size=128M
- --innodb-buffer-pool-size=${DB_BUFFER_POOL_SIZE:-1G}
- --innodb-flush-log-at-timeout=3
- --innodb-read-io-threads=32
- --innodb-write-io-threads=16
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
restart: unless-stopped
volumes:
cacti_db:
cacti_cache:
cacti_rra:
cacti_logs: