Sflow-rt App Install question

86 views
Skip to first unread message

gg

unread,
Nov 6, 2020, 10:11:58 AM11/6/20
to sFlow-RT
Hi Peter,

Is there a way of installing my own app without uploading it to Github? I see there is a script.file variable, but would that enable a full app with its own directory and html/js files?

Thanks.

gg

unread,
Nov 6, 2020, 10:40:36 AM11/6/20
to sFlow-RT
Peter,

Nevermind, I was able to mount the application inside the docker container app folder and then run the main js file it with the script.file variable.

Sorry.

Peter Phaal

unread,
Nov 6, 2020, 11:22:32 AM11/6/20
to gg, sFlow-RT
If you are building a more complex application with scripts and static content then you can package it under the sflow-rt/app directory:


You can then package the application with sFlow-RT using the sflow/sflow-rt Docker image:


Your Dockerfile can add settings, applications, scripts, etc. to the base image. The sflow/ddos-protect image was built on the sflow/sflow-rt base image for example:


Here is the Dockerfile that was used to build the ddos-protect image. The applications are loaded from GitHub in this case, but you could use COPY / ADD commands to install your application in the /sflow-rt/app directory.

FROM sflow/sflow-rt:latest

LABEL url=https://hub.docker.com/r/sflow/ddos-protect

ENV RTAPP="-Dbgp.start=yes -Ddns.servers=resolv.conf -Dgeo.country=resources/config/GeoLite2-Country.mmdb -Dgeo.asn=resources/config/GeoLite2-ASN.mmdb -Doui.names=resources/config/oui.txt"

RUN /sflow-rt/get-app.sh sflow-rt ddos-protect && /sflow-rt/get-app.sh sflow-rt browse-metrics && /sflow-rt/get-app.sh sflow-rt browse-flows && /sflow-rt/get-app.sh sflow-rt prometheus

HEALTHCHECK CMD curl -sf http://localhost:8008/app/ddos-protect/status || exit 1


--
You received this message because you are subscribed to the Google Groups "sFlow-RT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sflow-rt+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sflow-rt/bf707382-3caf-4ead-b3af-582601ef1344n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages