forked from smilebasti/npmGrafStats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
101 lines (95 loc) · 3.06 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
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
version: '3.8'
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: smilebasti/npmgrafstats:latest # change to ghcr.io/smilebasti/npmgrafstats if you prefer Github Container Registry
restart: unless-stopped
environment:
REDIRECTION_LOGS: '<set TRUE or FALSE or ONLY>' # TRUE or FALSE or ONLY
INTERNAL_LOGS: '<set TRUE or FALSE>' # see Github wiki for more information
MONITORING_LOGS: '<set TRUE or FALSE>' # see Github wiki for more information
INFLUX_HOST: '<replace>:8086' # use host IP
INFLUX_BUCKET: 'npmgrafstats'
INFLUX_ORG: 'npmgrafstats'
INFLUX_TOKEN: '<replace>' # insert after first run and manual token creation
volumes:
- ./data/logs:/logs
- ./geolite:/geolite
- ./monitoringips.txt:/monitoringips.txt # optional only mount if preexists and a wanted feature
depends_on:
- geoipupdate
- npm
influxdb:
image: influxdb:2.7-alpine
restart: unless-stopped
environment:
DOCKER_INFLUXDB_INIT_MODE: 'setup'
DOCKER_INFLUXDB_INIT_USERNAME: '<replace>'
DOCKER_INFLUXDB_INIT_PASSWORD: '<replace>' # atleast 8 characters
DOCKER_INFLUXDB_INIT_ORG: 'npmgrafstats'
DOCKER_INFLUXDB_INIT_BUCKET: 'npmgrafstats'
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