Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Git
.git
.gitignore
.gitattributes


# CI
.codeclimate.yml
.travis.yml
.taskcluster.yml

# Docker
docker-compose.yml
Dockerfile
.docker
.dockerignore

# Byte-compiled / optimized / DLL files
**/__pycache__/
**/*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Virtual environment
*.env*
.venv/
venv/

# PyCharm
.idea

# Python mode for VIM
.ropeproject
**/.ropeproject

# Vim swap files
**/*.swp

# VS Code
.vscode/

# Ignore build scripts
build_publish.sh
build.env
9 changes: 9 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
# 1. Do not change any variable names
# 2. Read instructions carefully

# Root Folders
CONFIG_PATH=./config
DATA_PATH=./data
LOGS_PATH=./logs
REDIS_CONFIG_PATH=./config/redis
PROMETHEUS_CONFIG_PATH=./config/prometheus
GRAFANA_DATASOURCES_PATH=./config/grafana/datasources
GRAFANA_DASHBOARDS_PATH=./config/grafana/dashboards

# Site target list
# - If modifying this list, make sure you limit to 5 websites and use the domain name as shown here
SITES="google.com,facebook.com,twitter.com,youtube.com,amazon.com"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ venv/
ENV/
env.bak/
venv.bak/
.env*

# Spyder project settings
.spyderproject
Expand Down
19 changes: 15 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# Dockerfile for netprobe_lite
# https://github.com/plaintextpackets/netprobe_lite/
FROM python:3.11-slim-bookworm

COPY requirements.txt /netprobe_lite/requirements.txt
# Default to arm32v7 if no build argument is provided
ARG BASE_IMAGE_ARCH=arm32v7

# Default to Python 3.12 if no build argument is provided
ARG PYTHON_VERSION=3.12

FROM ${BASE_IMAGE_ARCH}/python:${PYTHON_VERSION}-slim-bookworm

WORKDIR /netprobe_lite

# Copy application code
COPY src/ /netprobe_lite/

# Install python/pip
ENV PYTHONUNBUFFERED=1
Expand All @@ -11,6 +21,7 @@ ENV PIP_DISABLE_PIP_VERSION_CHECK=on
RUN apt-get update && apt-get install -y iputils-ping && apt-get install -y traceroute && apt-get clean \
&& pip install -r /netprobe_lite/requirements.txt --break-system-packages

WORKDIR /netprobe_lite
# Make sure entrypoint.sh is executable
RUN chmod +x /netprobe_lite/entrypoint.sh

ENTRYPOINT [ "/bin/bash", "./entrypoint.sh" ]
ENTRYPOINT [ "/bin/bash", "/netprobe_lite/entrypoint.sh" ]
Loading