forked from smilebasti/npmGrafStats
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
111 lines (102 loc) · 3.21 KB
/
docker-compose.yml
File metadata and controls
111 lines (102 loc) · 3.21 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
services:
npm:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
# These ports are in format <host-port>:<container-port>
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
# Add any other Stream port you want to expose
# - '21:21' # FTP
environment:
# Mysql/Maria connection parameters:
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD: "npm"
DB_MYSQL_NAME: "npm"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: 'jc21/mariadb-aria:latest'
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: 'npm'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'npm'
volumes:
- ./mysql:/var/lib/mysql
npmgraf:
image: vsc55/npmgraf:test
restart: unless-stopped
environment:
INFLUX_URL: "http://influxdb:8086"
INFLUX_ORG: "${INFLUX_ORG}"
INFLUX_BUCKET: "${INFLUX_BUCKET}"
INFLUX_TOKEN: "${INFLUXDB_ADMIN_TOKEN}"
INFLUX_RETRY_CONNECT: 10
INFLUX_RETRY_DELAY: 5
ABUSEIP_KEY: "${ABUSEIP_KEY}"
ABUSEIP_CACHE_EXPIRE: 2880 # in minutes
PROXY_LOGS: "TRUE"
REDIRECT_LOGS: "TRUE"
MONITORING_LOGS: "TRUE"
INTERNAL_LOGS: "TRUE"
PUBLIC_LOGS: "TRUE"
volumes:
- ./data/logs:/logs # Mount for NPM logs
- ./geolite:/geolite # Optional, Mount for GeoLite2 databases
- ./monitoringips.txt:/data/monitoringips.txt # Optional, Mount for monitoring IPs list
- ./abuseipdb_cache.json:/data/abuseipdb_cache.json # Optional, Mount for AbuseIPDB cache
depends_on:
- geoipupdate
- npm
influxdb:
image: influxdb:2.7-alpine
restart: unless-stopped
environment:
DOCKER_INFLUXDB_INIT_MODE: setup
DOCKER_INFLUXDB_INIT_USERNAME: admin
DOCKER_INFLUXDB_INIT_PASSWORD: ${INFLUXDB_PASSWORD}
DOCKER_INFLUXDB_INIT_ORG: ${INFLUX_ORG}
DOCKER_INFLUXDB_INIT_BUCKET: ${INFLUX_BUCKET}
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${INFLUXDB_ADMIN_TOKEN}
volumes:
# Mount for influxdb data directory and configuration
- ./influxdbv2:/var/lib/influxdb2
ports:
- '8086:8086'
geoipupdate:
image: maxmindinc/geoipupdate
restart: unless-stopped
environment:
GEOIPUPDATE_ACCOUNT_ID: '<replace>'
GEOIPUPDATE_LICENSE_KEY: '<replace>'
GEOIPUPDATE_EDITION_IDS: 'GeoLite2-City GeoLite2-ASN' #GeoLite2-ASN is optional
GEOIPUPDATE_FREQUENCY: 24
volumes:
- ./geolite:/usr/share/GeoIP
portainer:
image: portainer/portainer-ce:latest
restart: always
ports:
- '8000:8000'
- '9000:9000'
- '9443:9443'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./portainer_data:/data
grafana:
image: grafana/grafana-oss
restart: unless-stopped
ports:
- '3000:3000'
volumes:
- ./grafana-storage:/var/lib/grafana # after start: sudo chown 472:472 grafana-storage