Skip to content
Merged
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
28 changes: 28 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# VCS and CI/CD
.git
.github/

# Python build artefacts and envs
__pycache__/
*.egg-info
.venv/
venv/
.env

# Local outputs and data
results/
*.csv
nifi_data/
nifi_logs/
nifi_registry_data/
grafana-data/
pgdata/

# Assets not needed for runtime image
Alerting.md
images/
tests/

# Compose/config files not required in image
docker-compose.yml
prometheus.yml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ pgdata
*.egg-info
*__pycache__
.~lock.prometheus_metrics_log*
notes.txt
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python:3.11-slim
WORKDIR /app
COPY pyproject.toml README.md ./
COPY nifipulse/ ./nifipulse/
RUN pip install -U pip && pip install --no-cache-dir .
ENTRYPOINT ["nifipulse"]
CMD ["--poll","10","--interval","60"]
File renamed without changes.
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ services:
- ./db/init:/docker-entrypoint-initdb.d:ro
restart: unless-stopped

nifipulse:
image: ghcr.io/OWNER/NiFiPulse:latest
depends_on: [prometheus, postgres]
environment:
- PROM_URL=http://prometheus:9090/api/v1/query
- PG_DSN=postgresql+psycopg2://postgres:postgres@postgres:5432/metrics_db
volumes:
- ./results:/app/results
restart: unless-stopped

volumes:
grafana-data:
pgdata:
7 changes: 3 additions & 4 deletions nifipulse/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ def main():
parser = argparse.ArgumentParser(description="Run NifiPulse ETL CLI")
parser.add_argument(
"--poll",
nargs="?",
const=10, # `--poll` with no value → 10
type=int,
default=10, # no `--poll` at all → 10
help="Number of polling cycles (default 10). Use --poll 0 to run forever."
default=10,
metavar="N",
help="Number of polling cycles (default 10; use 0 to run forever)."
)
parser.add_argument(
"--interval",
Expand Down
Loading