-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
FROM resin/%%RESIN_MACHINE_NAME%%-debian | ||
|
||
|
||
RUN apt-get update && apt-get install -yq \ | ||
libpng-dev \ | ||
libfreetype6-dev \ | ||
pkg-config \ | ||
build-essential \ | ||
curl \ | ||
manpages-dev \ | ||
python3 \ | ||
python3-dev \ | ||
python3-pip \ | ||
python3-tk \ | ||
python3-setuptools \ | ||
libfreetype6-dev \ | ||
rpl \ | ||
git | ||
|
||
RUN sudo easy_install3 pip | ||
#RUN pip install -r | ||
|
||
# Set our working directory | ||
WORKDIR /usr/src/app | ||
|
||
# switch on systemd init system in container | ||
ENV INITSYSTEM on | ||
|
||
# Install NetData Monitoring | ||
RUN curl -Ss 'https://raw.githubusercontent.com/firehol/netdata-demo-site/master/install-required-packages.sh' >/tmp/kickstart.sh && bash /tmp/kickstart.sh -i netdata-all | ||
RUN git clone https://github.com/firehol/netdata.git --depth=1 | ||
RUN cd netdata/ && bash netdata-installer.sh && cd ../ | ||
|
||
# This will copy all files in our root to the working directory in the container | ||
COPY . ./ | ||
|
||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# main.py will run when container starts up on the device | ||
CMD ["bash","/usr/src/app/start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print("Hi!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[global] | ||
port = 80 | ||
multi threaded web server = no | ||
enable web responses gzip compression = no | ||
history = 600 | ||
update every = 5 | ||
memory mode = ram | ||
debug log = none | ||
error log = none | ||
access log = none | ||
[plugins] | ||
proc = yes | ||
|
||
tc = no | ||
idlejitter = no | ||
cgroups = no | ||
checks = no | ||
apps = no | ||
charts.d = no | ||
node.d = no | ||
|
||
plugins directory = /usr/libexec/netdata/plugins.d | ||
enable running new plugins = no | ||
check for new plugins every = 60 | ||
[plugin:proc] | ||
/proc/net/dev = yes # network interfaces | ||
/proc/diskstats = yes # disks | ||
/proc/net/snmp = yes # generic IPv4 | ||
# /proc/net/snmp6 = yes # generic IPv6 | ||
# /proc/net/netstat = yes # TCP and UDP | ||
# /proc/net/stat/conntrack = yes # firewall | ||
# /proc/net/ip_vs/stats = yes # IP load balancer | ||
# /proc/net/stat/synproxy = yes # Anti-DDoS | ||
/proc/stat = yes # CPU, context switches | ||
/proc/meminfo = yes # Memory | ||
/proc/vmstat = yes # Memory operations | ||
# /proc/net/rpc/nfsd = yes # NFS Server | ||
/proc/sys/kernel/random/entropy_avail = yes # Cryptography | ||
# /proc/interrupts = yes # Interrupts | ||
# /proc/softirqs = yes # SoftIRQs | ||
# /proc/loadavg = yes # Load Average | ||
# /sys/kernel/mm/ksm = yes # Memory deduper | ||
netdata server resources = yes # netdata charts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
netdata -p 80 -c /usr/src/app/netdataconfig.txt | ||
python3 /usr/src/app/main.py |