monitors your net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.7 KiB

3 years ago
# netmon
3 years ago
super basic way to run
```
*untested now
mkdir data
3 years ago
docker run --rm -d \
--name netmon \
-p 4000:3000 \
-e dstHost=1.1.1.1 \
-e dstPort=53 \
-v $(pwd)/data:/app/data \
3 years ago
daveplsno/netmon:latest
```
or for a much more painful but more premium way to run, check the files in the swarm folder
3 years ago
bunch of misc cmds used along the way
3 years ago
```
docker run --rm -it --name pls -w /app -p 3000:3000 -p 5000:5000 -e dstHost=localhost -e dstPort=8000 -e TZ=Australia/Sydney -v /home/blender/projects/netmon:/app nikolaik/python-nodejs:python3.9-nodejs16-alpine sh
docker exec -it pls sh
apk add sqlite
npm install -g nodemon
npm install express sqlite
python -m http.server 8000
export dstHost=localhost dstPort=8000
python netmon.py monitor
sqlite3 db.sqlite3
.headers on
.mode column
`SELECT * FROM netmonResults;`
npm install -D tailwindcss@latest postcss@latest autoprefixer@latest postcss-cli
npm install tailwindcss postcss autoprefixer postcss-cli
```
dev outside the container
```
python3 -m http.server 8000
python3 netmon.py monitor
npm run dev
```
## docker img update steps
update tag
`docker-compose build`
`docker push daveplsno/netmon:<tag>`
misc container things
```
docker run --rm \
--name netmonThrowaway \
-p 4000:3000 \
-e dstHost=1.1.1.1 \
-e dstPort=53 \
daveplsno/netmon:2
# used this to migrate data between old/new mounts
docker run --rm -it --name pls -w /app \
-v netmon_netmon-data:/dataOld \
-v netmon_data-david:/dataNew \
nikolaik/python-nodejs:python3.9-nodejs16-alpine sh
docker run --rm -it --name pls -w /app \
-v netmon_netmon-data-shannon:/dataOld \
-v netmon_data-shannon:/dataNew \
nikolaik/python-nodejs:python3.9-nodejs16-alpine sh
```