add Docker containerization and Umami analytics support
- Dockerfile with python:3.11-slim, whois and dnsutils - docker-entrypoint.sh for container startup - .dockerignore to keep image lean - Umami analytics script in base.html (conditional) - Inject EIRESCOPE_UMAMI_WEBSITE_ID via Jinja2 globals
This commit is contained in:
parent
0168261e00
commit
0eb17a3b37
5 changed files with 45 additions and 0 deletions
10
.dockerignore
Normal file
10
.dockerignore
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
.git
|
||||
.gitignore
|
||||
.claude
|
||||
__pycache__
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.egg-info
|
||||
.env
|
||||
README.md
|
||||
LICENSE
|
||||
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
FROM python:3.11-slim
|
||||
|
||||
# System dependencies for OSINT modules (whois lookups, DNS queries)
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends whois dnsutils && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
8
docker-entrypoint.sh
Normal file
8
docker-entrypoint.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Ensure tmp directory exists for ephemeral SQLite database
|
||||
mkdir -p /tmp
|
||||
|
||||
echo "Starting EireScope OSINT Dashboard..."
|
||||
exec python run.py --host 0.0.0.0 --port 5000
|
||||
|
|
@ -31,6 +31,9 @@ jinja_env = Environment(
|
|||
autoescape=True,
|
||||
)
|
||||
|
||||
# Umami Analytics — inject website ID into all templates
|
||||
jinja_env.globals["umami_website_id"] = os.getenv("EIRESCOPE_UMAMI_WEBSITE_ID", "")
|
||||
|
||||
# Initialize core components — always use /tmp for SQLite (avoids filesystem restrictions)
|
||||
import tempfile
|
||||
_db_path = os.path.join(tempfile.gettempdir(), "eirescope_investigations.db")
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}EireScope{% endblock %} — OSINT Dashboard</title>
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
{% if umami_website_id %}
|
||||
<script defer src="https://analytics.richardnixon.dev/script.js"
|
||||
data-website-id="{{ umami_website_id }}"></script>
|
||||
{% endif %}
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue